From marcus-sup at bar-coded.net Tue Apr 1 06:07:06 2008 From: marcus-sup at bar-coded.net (Marcus Williams) Date: Tue, 01 Apr 2008 11:07:06 +0100 Subject: [sup-talk] [PATCH] Fix for icon title in gnome terminal (possibly others) In-Reply-To: <1206547886-sup-1106@south> References: <1204711708-sup-3638@tomsk> <1206547886-sup-1106@south> Message-ID: <1207044311-sup-3103@tomsk> On 26.3.2008, William Morgan wrote: > Reformatted excerpts from Marcus Williams's message of 2008-03-05: > > The escape code used for terminal titles works mostly but it doesnt > > set the icon title as well [1], which is useful when minimised. This > > patch makes the escape code set both window and icon title so the task > > bar updates correctly in the gnome terminal (and probably others). > > Reworked slightly (to avoid duplicating the conditional) and applied. I couldnt figure out what you meant when you said this but I just checked the diff that went in and that explained it... My patch removes the old escape code line and replaces it with a single line, but your patch prints both escape codes. You only need the one in my patch as that does both icon and window titles, so you should be able to have the single line: print "\033]0;#{title}\07" if title && @in_x ... the fifth char '0' in the escape code means window AND icon (1 would be icon, 2 would be window). Not sure if you misread the patch or if I duffed up :) Marcus From wmorgan-sup at masanjin.net Tue Apr 1 11:03:02 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 01 Apr 2008 08:03:02 -0700 Subject: [sup-talk] [PATCH] Fix for icon title in gnome terminal (possibly others) In-Reply-To: <1207044311-sup-3103@tomsk> References: <1204711708-sup-3638@tomsk> <1206547886-sup-1106@south> <1207044311-sup-3103@tomsk> Message-ID: <1207062157-sup-5700@south> Reformatted excerpts from Marcus Williams's message of 2008-04-01: > Not sure if you misread the patch or if I duffed up :) I misread the patch. Sorry about that! Should be fixed now. -- William From wmorgan-sup at masanjin.net Tue Apr 1 11:04:55 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 01 Apr 2008 08:04:55 -0700 Subject: [sup-talk] sup crashes on startup In-Reply-To: References: Message-ID: <1207062263-sup-7899@south> Reformatted excerpts from Martin DeMello's message of 2008-03-28: > --- ArgumentError from thread: main > no name for account What does your ~/.sup/config.yaml look like? This is complaining about that. (Not the most obvious error, I'll admit.) -- William From wmorgan-sup at masanjin.net Tue Apr 1 11:35:23 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 01 Apr 2008 08:35:23 -0700 Subject: [sup-talk] crash while sup is sitting idle In-Reply-To: <20080329030356.GA8459@gurski.org> References: <20080329030356.GA8459@gurski.org> Message-ID: <1207064087-sup-7567@south> Reformatted excerpts from Michael Gurski's message of 2008-03-28: > After a 28+ hour sup-sync -a -o, on git head, sup sitting idle crashed > with the following error: > > --- Ferret::StateError from thread: load threads for thread-index-mode > State Error occured at :93 in xraise > Error occured in index.c:4150 - sr_get_lazy_doc > Document 69 has already been deleted Scary Ferret error. Any weird circumstances, like running out of disk space? Does this happen consistently? -- William From sup-talk at gurski.org Tue Apr 1 12:52:53 2008 From: sup-talk at gurski.org (Michael Gurski) Date: Tue, 01 Apr 2008 12:52:53 -0400 Subject: [sup-talk] crash while sup is sitting idle In-Reply-To: <1207064087-sup-7567@south> References: <20080329030356.GA8459@gurski.org> <1207064087-sup-7567@south> Message-ID: <1207068663-sup-6170@ln> Excerpts from William Morgan's message of Tue Apr 01 11:35:23 -0400 2008: > Reformatted excerpts from Michael Gurski's message of 2008-03-28: > > After a 28+ hour sup-sync -a -o, on git head, sup sitting idle crashed > > with the following error: > > > > --- Ferret::StateError from thread: load threads for thread-index-mode > > State Error occured at :93 in xraise > > Error occured in index.c:4150 - sr_get_lazy_doc > > Document 69 has already been deleted > > Scary Ferret error. Any weird circumstances, like running out of disk > space? Does this happen consistently? 13G free on that partition, quite a bit of memory free as well, both real and swap. I can more or less get it to happen consistently if I try to load 4+ pages of unread messages at a time. It might be more needed now, as it's been several days since I've tried it. -- Michael A. Gurski (opt. [first].)[last]@pobox.com http://www.pobox.com/~[last] 1024R/39B5BADD PGP: 34 93 A9 94 B1 59 48 B7 17 57 1E 4E 62 56 45 70 1024D/1166213E GPG: 628F 37A4 62AF 1475 45DB AD81 ADC9 E606 1166 213E 4096R/C0B4F04B GPG: 5B3E 75D7 43CF CF34 4042 7788 1DCE B5EE C0B4 F04B Views expressed by the host do not reflect the staff, management or sponsors. From wmorgan-sup at masanjin.net Tue Apr 1 13:13:23 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 01 Apr 2008 10:13:23 -0700 Subject: [sup-talk] crash while sup is sitting idle In-Reply-To: <1207068663-sup-6170@ln> References: <20080329030356.GA8459@gurski.org> <1207064087-sup-7567@south> <1207068663-sup-6170@ln> Message-ID: <1207069973-sup-4350@south> Reformatted excerpts from Michael Gurski's message of 2008-04-01: > 13G free on that partition, quite a bit of memory free as well, both > real and swap. I can more or less get it to happen consistently if I > try to load 4+ pages of unread messages at a time. It might be more > needed now, as it's been several days since I've tried it. And which git branch, master or next? -- William From sup-talk at gurski.org Tue Apr 1 15:50:40 2008 From: sup-talk at gurski.org (Michael Gurski) Date: Tue, 01 Apr 2008 15:50:40 -0400 Subject: [sup-talk] crash while sup is sitting idle In-Reply-To: <1207069973-sup-4350@south> References: <20080329030356.GA8459@gurski.org> <1207064087-sup-7567@south> <1207068663-sup-6170@ln> <1207069973-sup-4350@south> Message-ID: <1207079350-sup-4391@ln> Excerpts from William Morgan's message of Tue Apr 01 13:13:23 -0400 2008: > Reformatted excerpts from Michael Gurski's message of 2008-04-01: > > 13G free on that partition, quite a bit of memory free as well, both > > real and swap. I can more or less get it to happen consistently if I > > try to load 4+ pages of unread messages at a time. It might be more > > needed now, as it's been several days since I've tried it. > > And which git branch, master or next? master -- Michael A. Gurski (opt. [first].)[last]@pobox.com http://www.pobox.com/~[last] 1024R/39B5BADD PGP: 34 93 A9 94 B1 59 48 B7 17 57 1E 4E 62 56 45 70 1024D/1166213E GPG: 628F 37A4 62AF 1475 45DB AD81 ADC9 E606 1166 213E 4096R/C0B4F04B GPG: 5B3E 75D7 43CF CF34 4042 7788 1DCE B5EE C0B4 F04B Views expressed by the host do not reflect the staff, management or sponsors. From chrisw at rice.edu Tue Apr 1 16:03:08 2008 From: chrisw at rice.edu (Christopher Warrington) Date: Tue, 1 Apr 2008 15:03:08 -0500 Subject: [sup-talk] crash while sup is sitting idle In-Reply-To: <1207064087-sup-7567@south> References: <20080329030356.GA8459@gurski.org> <1207064087-sup-7567@south> Message-ID: <1904135646.20080401150308@rice.edu> William Morgan @ 2008-4-01 10:35:23 AM "[sup-talk] crash while sup is sitting idle" >> --- Ferret::StateError from thread: load threads for thread-index-mode >> State Error occured at :93 in xraise >> Error occured in index.c:4150 - sr_get_lazy_doc >> Document 69 has already been deleted > Scary Ferret error. Any weird circumstances, like running out of > disk space? Does this happen consistently? I've had this too. A Index.index.optimize seems to fix it. -- Christopher Warrington Minds are like parachutes: they only function when open. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080401/1028bd6a/attachment.bin From grant at antiflux.org Tue Apr 1 16:48:47 2008 From: grant at antiflux.org (Grant Hollingworth) Date: Tue, 01 Apr 2008 16:48:47 -0400 Subject: [sup-talk] [PATCH] reload label list on focus Message-ID: <1207082674-sup-4879@spooky.local> This ensures the unread count for each label is correct. I often read my list mail from the label list. When I close the thread index and go back to the label list the unread message count is wrong. This bugs me. I'm sure a less brutal way of doing this is possible with the UpdateManager but that seems complicated and therefore prone to errors. --- lib/sup/modes/label-list-mode.rb | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/sup/modes/label-list-mode.rb b/lib/sup/modes/label-list-mode.rb index 514e9c4..662bb44 100644 --- a/lib/sup/modes/label-list-mode.rb +++ b/lib/sup/modes/label-list-mode.rb @@ -41,6 +41,10 @@ protected buffer.mark_dirty if buffer end + def focus + reload # make sure counts are up-to-date + end + def regen_text @text = [] labels = LabelManager.listable_labels -- 1.5.4.4 From grant at antiflux.org Tue Apr 1 17:49:36 2008 From: grant at antiflux.org (Grant Hollingworth) Date: Tue, 01 Apr 2008 17:49:36 -0400 Subject: [sup-talk] [PATCH] reload label list on focus In-Reply-To: <1207082674-sup-4879@spooky.local> References: <1207082674-sup-4879@spooky.local> Message-ID: <1207086451-sup-7738@spooky.local> This ensures the unread count for each label is correct. I often read my list mail from the label list. When I close the thread index and go back to the label list the unread message count is wrong. This bugs me. I'm sure a less brutal way of doing this is possible with the UpdateManager but that seems complicated and therefore prone to errors. --- Oops... last patch had focus under protected. lib/sup/modes/label-list-mode.rb | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/lib/sup/modes/label-list-mode.rb b/lib/sup/modes/label-list-mode.rb index 514e9c4..132b654 100644 --- a/lib/sup/modes/label-list-mode.rb +++ b/lib/sup/modes/label-list-mode.rb @@ -29,6 +29,11 @@ class LabelListMode < LineCursorMode BufferManager.flash "No labels messages with unread messages." end end + + def focus + reload # make sure unread message counts are up-to-date + end + protected def toggle_show_unread_only -- 1.5.4.4 From wmorgan-sup at masanjin.net Wed Apr 2 16:51:18 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Wed, 02 Apr 2008 13:51:18 -0700 Subject: [sup-talk] [PATCH] First draft of attachment processing for more gmail style searches In-Reply-To: <1206306720-sup-2563@tomsk> References: <1203972458-sup-5906@tomsk> <1204220051-sup-129@south> <1204232994-sup-628@tomsk> <1204479552-sup-4100@south> <1204711082-sup-3541@tomsk> <1205013484-sup-7653@south> <1206306720-sup-2563@tomsk> Message-ID: <1207169448-sup-4407@south> Reformatted excerpts from Marcus Williams's message of 2008-03-23: > Mmmmm - I'm on the lookout for a decent issue tracker :) Any more > info? Finally released! May or may not be something you're interested in, but it's what I wanted for Sup. http://ditz.rubyforge.org/ -- William From vasudeva at linkswarm.com Wed Apr 2 17:16:37 2008 From: vasudeva at linkswarm.com (vasudeva) Date: Wed, 02 Apr 2008 17:16:37 -0400 Subject: [sup-talk] [PATCH] First draft of attachment processing for more gmail style searches In-Reply-To: <1207169448-sup-4407@south> References: <1203972458-sup-5906@tomsk> <1204220051-sup-129@south> <1204232994-sup-628@tomsk> <1204479552-sup-4100@south> <1204711082-sup-3541@tomsk> <1205013484-sup-7653@south> <1206306720-sup-2563@tomsk> <1207169448-sup-4407@south> Message-ID: <1207170934-sup-8909@lenin> Excerpts from William Morgan's message of Wed Apr 02 16:51:18 -0400 2008: > > Finally released! May or may not be something you're interested in, but > it's what I wanted for Sup. > > http://ditz.rubyforge.org/ Nice. I love the clean minimal UI on this. -- linkswarm.com :: Collaborative Insolence vasudeva.linkswarm.com/gallery :: For The Faint of Heart From wmorgan-sup at masanjin.net Wed Apr 2 17:17:38 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Wed, 02 Apr 2008 14:17:38 -0700 Subject: [sup-talk] [ANN] ditz 0.1 Released Message-ID: <1207171051-sup-272@south> Why not spam you guys too? The plan is to start using this to track Sup bugs & feature requests a little more systematically than has been done so far. ditz version 0.1 has been released! * Ditz is a simple, light-weight distributed issue tracker designed to work with distributed version control systems like darcs and git. Ditz maintains an issue database file on disk, written in a line-based and human-editable format. This file is kept under version control, alongside project code. Changes in issue state is handled by version control like code change: included as part of a commit, merged with changes from other developers, conflict-resolved in the standard manner, etc. Ditz provides a simple, console-based interface for creating and updating the issue database file, and some rudimentary HTML generation capabilities for producing world-readable status pages. It offers no central public method of bug submission. Synopsis: # set up project. creates the bugs.yaml file. 1. ditz init 2. ditz add-release # add an issue 3. ditz add # where am i? 4. ditz status 5. ditz todo # do work 6. write code 7. ditz close 8. commit 9. goto 3 # finished! 10. ditz release Changes: ## 0.1 / 2008-04-02 * Initial release! * -- William From wmorgan-sup at masanjin.net Wed Apr 2 21:12:40 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Wed, 02 Apr 2008 18:12:40 -0700 Subject: [sup-talk] ISO 8859-15 at the header In-Reply-To: <20080327044901.GA12106@weisshuhn.de> References: <20080327044901.GA12106@weisshuhn.de> Message-ID: <1207185125-sup-9342@south> Reformatted excerpts from Carsten Sch?lzki's message of 2008-03-26: > But there is a little problem with the header-encoding. Seems, that > sup doesn't de- or encode ISO 8859-15 correct. > > There are no problems with the body or with ISO 8859-1 in the > header. It should work, if you have your LANG and stuff all set up correctly. What console character set encoding does Sup detect? (Typically the first message of the log buffer.) -- William From wmorgan-sup at masanjin.net Wed Apr 2 21:43:26 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Wed, 02 Apr 2008 18:43:26 -0700 Subject: [sup-talk] crash while sup is sitting idle In-Reply-To: <1904135646.20080401150308@rice.edu> References: <20080329030356.GA8459@gurski.org> <1207064087-sup-7567@south> <1904135646.20080401150308@rice.edu> Message-ID: <1207186936-sup-7182@south> Reformatted excerpts from Christopher Warrington's message of 2008-04-01: > I've had this too. A Index.index.optimize seems to fix it. Hm. I think I need to wrap a mutex around all Ferret access. -- William From wmorgan-sup at masanjin.net Wed Apr 2 21:49:43 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Wed, 02 Apr 2008 18:49:43 -0700 Subject: [sup-talk] default domain name In-Reply-To: <1206040874-sup-2650@tangerine.lanl.gov> References: <1206040874-sup-2650@tangerine.lanl.gov> Message-ID: <1207187033-sup-9070@south> Reformatted excerpts from John Bent's message of 2008-03-20: > My apologies if this is not a sup question. But I feel like this used to > work in pine ... My putmail config has server = server1.lanl.gov which > works for sending mail. However, if I just send to an address without > a domain attached (e.g. to johnbent instead of to johnbent at lanl.gov), then > I get a bounce from server1.lanl.gov saying "there is no > johnbent at server1.lanl.gov." Is there some way to config sup (or the rest of > my email infrastructure) to teach it a particular default email address? You can certainly add an entry to contacts.txt (either manually, or by highlighting the desired email address in Sup and hitting "i") with "johnbent" as an alias name for the full email address. Then Sup will do the expansion for you when you compose a message. To have this happen strictly at the level of the email address, I think it would be a SMTP server configuration issue. That's the point at which the email addresses get interpreted, at least for the purposes of finding a recipient. But I ain't an MTA expert. -- William From wmorgan-sup at masanjin.net Wed Apr 2 22:03:13 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Wed, 02 Apr 2008 19:03:13 -0700 Subject: [sup-talk] Crash In-Reply-To: <1206735524-sup-1255@cabinet> References: <1206735524-sup-1255@cabinet> Message-ID: <1207187962-sup-842@south> Reformatted excerpts from Marc Hartstein's message of 2008-03-28: > undefined method `to_nice_s' for nil:NilClass > /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:613:in `text_for_thread_at' I'm mostly confident this has been fixed in git. So you can try running it from there, or wait for the next release... -- William From cjs at weisshuhn.de Thu Apr 3 10:07:11 2008 From: cjs at weisshuhn.de (Carsten =?iso-8859-1?Q?Sch=F6lzki?=) Date: Thu, 3 Apr 2008 16:07:11 +0200 Subject: [sup-talk] ISO 8859-15 at the header In-Reply-To: <1207185125-sup-9342@south> References: <20080327044901.GA12106@weisshuhn.de> <1207185125-sup-9342@south> Message-ID: <20080403140711.GA482@weisshuhn.de> William Morgan [03.04.2008 03:12]: > Reformatted excerpts from Carsten Sch?lzki's message of 2008-03-26: > > But there is a little problem with the header-encoding. Seems, that > > sup doesn't de- or encode ISO 8859-15 correct. > > > > There are no problems with the body or with ISO 8859-1 in the > > header. > > It should work, if you have your LANG and stuff all set up correctly. > What console character set encoding does Sup detect? (Typically the > first message of the log buffer.) The detecting seems right to me. The log says: using character set encoding "ISO8859-15" From nicolas.pouillard at gmail.com Thu Apr 3 10:16:19 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Thu, 3 Apr 2008 16:16:19 +0200 Subject: [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup Message-ID: <12072321792626-git-send-email-nicolas.pouillard@gmail.com> More precisely new destinations are: - ~/.sup/exception-log.txt - ~/.sup/unable-to-decode.txt This patch avoid some kind of pollution. --- bin/sup | 4 ++-- lib/sup/message.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/sup b/bin/sup index 0d34215..a7623de 100644 --- a/bin/sup +++ b/bin/sup @@ -327,7 +327,7 @@ ensure end unless $exceptions.empty? - File.open("sup-exception-log.txt", "w") do |f| + File.open(File.join(BASE_DIR, "exception-log.txt"), "w") do |f| $exceptions.each do |e, name| f.puts "--- #{e.class.name} from thread: #{name}" f.puts e.message, e.backtrace @@ -337,7 +337,7 @@ unless $exceptions.empty? ---------------------------------------------------------------- I'm very sorry. It seems that an error occurred in Sup. Please accept my sincere apologies. If you don't mind, please send the -contents of sup-exception-log.txt and a brief report of the +contents of ~/.sup/exception-log.txt and a brief report of the circumstances to sup-talk at rubyforge dot orgs so that I might address this problem. Thank you! diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 6a2a9c4..249b6c6 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -423,7 +423,7 @@ private Iconv.iconv($encoding + "//IGNORE", charset, body + " ").join[0 .. -2] rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence, MessageFormatError => e Redwood::log "warning: error (#{e.class.name}) decoding message body from #{charset}: #{e.message}" - File.open("sup-unable-to-decode.txt", "w") { |f| f.write body } + File.open(File.join(BASE_DIR,"unable-to-decode.txt"), "w") { |f| f.write body } body end end -- 1.5.3.1.109.gacd69 From grant at antiflux.org Thu Apr 3 12:35:54 2008 From: grant at antiflux.org (Grant Hollingworth) Date: Thu, 03 Apr 2008 12:35:54 -0400 Subject: [sup-talk] [PATCH] fixed off-by-one error in imap.rb and maildir.rb In-Reply-To: <1206547432-sup-4074@south> References: <1204528063-sup-7345@chris-tablet> <1204531233-2092-1-git-send-email-chrisw@rice.edu> <1206547432-sup-4074@south> Message-ID: <1207240457-sup-91@spooky.local> * William Morgan [Wed Mar 26 12:04:10 -0400 2008]: > Precisely so. Applied. Thanks! This breaks Source#done?, so every poll the last message of each source gets reloaded. The state gets fixed from the index but it's still ugly. From grant at antiflux.org Thu Apr 3 12:40:36 2008 From: grant at antiflux.org (Grant Hollingworth) Date: Thu, 03 Apr 2008 12:40:36 -0400 Subject: [sup-talk] offlineimap Message-ID: <1207240781-sup-5354@spooky.local> I switched from IMAP to maildir via offlineimap. So much faster! How are people using offlineimap? Is it always running, or by cron, or in a before-poll? From rgh at roughage.com.au Thu Apr 3 16:59:56 2008 From: rgh at roughage.com.au (Richard Heycock) Date: Fri, 04 Apr 2008 07:59:56 +1100 Subject: [sup-talk] offlineimap In-Reply-To: <1207240781-sup-5354@spooky.local> References: <1207240781-sup-5354@spooky.local> Message-ID: <1207256259-sup-8918@wrasse> Excerpts from Grant Hollingworth's message of Fri Apr 04 03:40:36 +1100 2008: > I switched from IMAP to maildir via offlineimap. So much faster! > > How are people using offlineimap? Is it always running, or by cron, or in a > before-poll? I run mine from cron. Having said that offlineimap causes me a great deal of pain; when it works it works well but when it doesn't (which is fairly often) it's a pain. Oh and it won't tell you what the problem is :-( Unfortunately there doesn't really seem to be much else about Just my two cents. rgh. -- +61 (0) 410 646 369 rgh at neoss.com.au You're worried criminals will continue to penetrate into cyberspace, and I'm worried complexity, poor design and mismanagement will be there to meet them - Marcus Ranum !DSPAM:47f5454c18821144792784! From marcus-sup at bar-coded.net Fri Apr 4 04:26:10 2008 From: marcus-sup at bar-coded.net (Marcus Williams) Date: Fri, 04 Apr 2008 09:26:10 +0100 Subject: [sup-talk] offlineimap In-Reply-To: <1207240781-sup-5354@spooky.local> References: <1207240781-sup-5354@spooky.local> Message-ID: <1207297403-sup-6394@tomsk> On 3.4.2008, Grant Hollingworth wrote: > How are people using offlineimap? Is it always running, or by cron, or in a > before-poll? I tend to ssh into wherever I run sup and run screen. I've set screen up to start sup and kick off offlineimap. Works like a charm. That way you can poke offlineimap if you want to poll for some reason. Works well from cron as well on my work machine. Marcus From cameronm at webpipe.net Fri Apr 4 02:56:28 2008 From: cameronm at webpipe.net (Cameron Matheson) Date: Fri, 04 Apr 2008 00:56:28 -0600 Subject: [sup-talk] offlineimap In-Reply-To: <1207256259-sup-8918@wrasse> References: <1207240781-sup-5354@spooky.local> <1207256259-sup-8918@wrasse> Message-ID: <1207292109-sup-707@bernard> Excerpts from Richard Heycock's message of Thu Apr 03 14:59:56 -0600 2008: > Having said that offlineimap causes me a great deal of pain; when it works it > works well but when it doesn't (which is fairly often) it's a pain. Oh and it > won't tell you what the problem is :-( Unfortunately there doesn't really > seem to be much else about I haven't tried offlineimap yet. I'm using getmail right now, which has gone really smooth. What advantages does offlineimap provide for the sup crowd (there shouldn't be any changes to the maildir to push back to the imap account, right?) Cam -- Webpipe.net From nicolas.pouillard at gmail.com Fri Apr 4 08:14:06 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Fri, 04 Apr 2008 14:14:06 +0200 Subject: [sup-talk] About newlines Message-ID: <1207309393-sup-2829@ausone.inria.fr> I'm hitting a bug concerning forwarding, all newlines get trimmed off. I'm trying to fix the bug, but I don't understand if arrays of lines are supposed to be ended by newlines or not. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080404/acbb1193/attachment.bin From kendall at clarkparsia.com Fri Apr 4 09:13:44 2008 From: kendall at clarkparsia.com (kendall at clarkparsia.com) Date: Fri, 4 Apr 2008 09:13:44 -0400 (EDT) Subject: [sup-talk] About newlines Message-ID: <47375.192.168.1.71.1207314824.webmail@192.168.1.71> On Friday, April 4, 2008 8:14am, Nicolas Pouillard said: > _______________________________________________ > sup-talk mailing list > sup-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/sup-talk > I'm hitting a bug concerning forwarding, all newlines get trimmed off. I'm > trying to fix the bug, but I don't understand if arrays of lines are supposed > to be ended by newlines or not. This is also a problem for me, though I haven't tried to fix it. :> Cheers, Kendall From grant at antiflux.org Fri Apr 4 09:47:37 2008 From: grant at antiflux.org (Grant Hollingworth) Date: Fri, 04 Apr 2008 09:47:37 -0400 Subject: [sup-talk] offlineimap In-Reply-To: <1207256259-sup-8918@wrasse> References: <1207240781-sup-5354@spooky.local> <1207256259-sup-8918@wrasse> Message-ID: <1207316616-sup-9713@spooky.local> * Richard Heycock [Thu Apr 03 16:59:56 -0400 2008]: > Having said that offlineimap causes me a great deal of pain; when it > works it works well but when it doesn't (which is fairly often) it's a > pain. Oh and it won't tell you what the problem is :-( Unfortunately > there doesn't really seem to be much else about Yeah, I don't think I've seen any error messages... just backtraces. The only big problem I've had is with a memory error when copying large messages. The problem is known [1] and fixed [2] in Python, but the current stable version (2.5.2) doesn't include the fix. I made the two one-line changes myself and now offlineimap is happy: http://svn.python.org/view/python/branches/release25-maint/Lib/imaplib.py?rev=61007&r1=51333&r2=61007 http://svn.python.org/view/python/branches/release25-maint/Lib/socket.py?rev=61009&r1=54544&r2=61009 [1] http://software.complete.org/software/issues/show/20 [2] http://bugs.python.org/issue1389051 From grant at antiflux.org Fri Apr 4 09:48:21 2008 From: grant at antiflux.org (Grant Hollingworth) Date: Fri, 04 Apr 2008 09:48:21 -0400 Subject: [sup-talk] offlineimap In-Reply-To: <1207292109-sup-707@bernard> References: <1207240781-sup-5354@spooky.local> <1207256259-sup-8918@wrasse> <1207292109-sup-707@bernard> Message-ID: <1207316862-sup-7752@spooky.local> * Cameron Matheson [Fri Apr 04 02:56:28 -0400 2008]: > I haven't tried offlineimap yet. I'm using getmail right now, which has > gone really smooth. What advantages does offlineimap provide for the > sup crowd (there shouldn't be any changes to the maildir to push back to > the imap account, right?) No changes yet. I'd like to get sup at least marking messages as read in maildir sources. From damokles at ubuntu.com Fri Apr 4 05:52:56 2008 From: damokles at ubuntu.com (Caspar Clemens Mierau) Date: Fri, 4 Apr 2008 11:52:56 +0200 Subject: [sup-talk] NoMethodError from thread Message-ID: <20080404095256.GA14684@lilith.spinnenwerk.de> sup 0.4 (on debian etch, installed as gem) crashed with the following stack --- NoMethodError from thread: poll after loading inbox undefined method `find_all' for nil:NilClass /var/lib/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:191:in `fetch' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:135:in `unsynchronized_scan_mailbox' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:105:in `unsynchronized_raw_header' (eval):3:in `raw_header' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize' (eval):3:in `raw_header' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:93:in `load_header' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/util.rb:534:in `send' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/util.rb:534:in `__pass' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/util.rb:523:in `method_missing' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/message.rb:62:in `initialize' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/poll.rb:151:in `new' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/poll.rb:151:in `add_messages_from' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:167:in `each' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:155:in `upto' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/imap.rb:155:in `each' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/util.rb:534:in `send' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/util.rb:534:in `__pass' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/util.rb:523:in `method_missing' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/poll.rb:141:in `add_messages_from' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/poll.rb:98:in `do_poll' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/poll.rb:86:in `each' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/poll.rb:86:in `do_poll' /usr/lib/ruby/1.8/thread.rb:135:in `synchronize' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/poll.rb:85:in `do_poll' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `send' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `method_missing' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/modes/poll-mode.rb:17:in `poll' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/poll.rb:53:in `poll' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `send' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `method_missing' /var/lib/gems/1.8/gems/sup-0.4/bin/sup:199 /var/lib/gems/1.8/gems/sup-0.4/lib/sup.rb:60:in `reporting_thread' /var/lib/gems/1.8/gems/sup-0.4/lib/sup.rb:58:in `initialize' /var/lib/gems/1.8/gems/sup-0.4/lib/sup.rb:58:in `new' /var/lib/gems/1.8/gems/sup-0.4/lib/sup.rb:58:in `reporting_thread' /var/lib/gems/1.8/gems/sup-0.4/bin/sup:199 /var/lib/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:492:in `call' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:492:in `__unprotected_load_threads' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:452:in `call' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:452:in `load_n_threads_background' /var/lib/gems/1.8/gems/sup-0.4/lib/sup.rb:60:in `reporting_thread' /var/lib/gems/1.8/gems/sup-0.4/lib/sup.rb:58:in `initialize' /var/lib/gems/1.8/gems/sup-0.4/lib/sup.rb:58:in `new' /var/lib/gems/1.8/gems/sup-0.4/lib/sup.rb:58:in `reporting_thread' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:450:in `load_n_threads_background' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:501:in `__unprotected_load_threads' (eval):12:in `load_threads' /var/lib/gems/1.8/gems/sup-0.4/bin/sup:199 /var/lib/gems/1.8/bin/sup:18:in `load' /var/lib/gems/1.8/bin/sup:18 --- SystemExit from thread: main undefined method `find_all' for nil:NilClass /var/lib/gems/1.8/gems/sup-0.4/lib/sup.rb:64:in `select' /var/lib/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:31:in `nonblocking_getch' /var/lib/gems/1.8/gems/sup-0.4/bin/sup:212 /var/lib/gems/1.8/bin/sup:18:in `load' /var/lib/gems/1.8/bin/sup:18 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080404/a9853500/attachment.bin From nicolas.pouillard at gmail.com Fri Apr 4 12:00:56 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Fri, 4 Apr 2008 18:00:56 +0200 Subject: [sup-talk] [PATCH] Use read instead of readlines.join. Message-ID: <1207324856-7408-1-git-send-email-nicolas.pouillard@gmail.com> --- lib/sup/draft.rb | 2 +- lib/sup/hook.rb | 2 +- lib/sup/maildir.rb | 2 +- lib/sup/modes/file-browser-mode.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sup/draft.rb b/lib/sup/draft.rb index 81c0044..21de151 100644 --- a/lib/sup/draft.rb +++ b/lib/sup/draft.rb @@ -106,7 +106,7 @@ class DraftLoader < Source end def raw_message offset - IO.readlines(fn_for_offset(offset)).join + IO.read(fn_for_offset(offset)) end def start_offset; 0; end diff --git a/lib/sup/hook.rb b/lib/sup/hook.rb index 74ecfab..9494919 100644 --- a/lib/sup/hook.rb +++ b/lib/sup/hook.rb @@ -120,7 +120,7 @@ private unless @hooks.member? name @hooks[name] = begin - returning IO.readlines(fn_for(name)).join do + returning IO.read(fn_for(name)) do log "read '#{name}' from #{fn_for(name)}" end rescue SystemCallError => e diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index 584e657..620e8e2 100644 --- a/lib/sup/maildir.rb +++ b/lib/sup/maildir.rb @@ -72,7 +72,7 @@ class Maildir < Source def raw_message id scan_mailbox - with_file_for(id) { |f| f.readlines.join } + with_file_for(id) { |f| f.read } end def scan_mailbox opts={} diff --git a/lib/sup/modes/file-browser-mode.rb b/lib/sup/modes/file-browser-mode.rb index b49f3f4..b92468d 100644 --- a/lib/sup/modes/file-browser-mode.rb +++ b/lib/sup/modes/file-browser-mode.rb @@ -47,7 +47,7 @@ protected return unless f && f.file? begin - BufferManager.spawn f.to_s, TextMode.new(f.readlines.join) + BufferManager.spawn f.to_s, TextMode.new(f.read) rescue SystemCallError => e BufferManager.flash e.message end -- 1.5.5.rc3 From nicolas.pouillard at gmail.com Fri Apr 4 12:01:45 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Fri, 4 Apr 2008 18:01:45 +0200 Subject: [sup-talk] [PATCH] Fix a bug when forwarding and using crypto. Message-ID: <1207324905-7455-1-git-send-email-nicolas.pouillard@gmail.com> --- lib/sup/modes/edit-message-mode.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb index 3aad623..dd96002 100644 --- a/lib/sup/modes/edit-message-mode.rb +++ b/lib/sup/modes/edit-message-mode.rb @@ -324,7 +324,7 @@ protected ## do whatever crypto transformation is necessary if @crypto_selector && @crypto_selector.val != :none from_email = PersonManager.person_for(@header["From"]).email - to_email = (@header["To"] + @header["Cc"] + @header["Bcc"]).map { |p| PersonManager.person_for(p).email } + to_email = [@header["To"], @header["Cc"], @header["Bcc"]].flatten.compact.map { |p| PersonManager.person_for(p).email } m = CryptoManager.send @crypto_selector.val, from_email, to_email, m end -- 1.5.5.rc3 From wmorgan-sup at masanjin.net Fri Apr 4 12:08:02 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Fri, 04 Apr 2008 09:08:02 -0700 Subject: [sup-talk] About newlines In-Reply-To: <1207309393-sup-2829@ausone.inria.fr> References: <1207309393-sup-2829@ausone.inria.fr> Message-ID: <1207325216-sup-1624@south> Reformatted excerpts from nicolas.pouillard's message of 2008-04-04: > I'm hitting a bug concerning forwarding, all newlines get trimmed > off. I'm trying to fix the bug, but I don't understand if arrays of > lines are supposed to be ended by newlines or not. I don't see this behavior, either in the forward mode buffer or in the resulting message. Newlines shouldn't exist in arrays of lines. ForwardMode#forward_body_lines is the relevant method. Let me know what you discover. -- William From nicolas.pouillard at gmail.com Fri Apr 4 12:09:13 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Fri, 4 Apr 2008 18:09:13 +0200 Subject: [sup-talk] [PATCH] Fix a bug about forwarding that trimmed out newlines. Message-ID: <1207325353-7638-1-git-send-email-nicolas.pouillard@gmail.com> This seems to happen when one don't touch the forwarded email. Indeed most of the sup's code tend to assume that messages body are reprensented using an array of string *without* a trailing \n, except some parts of the code. This patch enforce that. It could become even more strict by raising an error instead of logging in join_lines. --- lib/sup/modes/edit-message-mode.rb | 11 +++++------ lib/sup/util.rb | 6 ++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb index dd96002..c3634af 100644 --- a/lib/sup/modes/edit-message-mode.rb +++ b/lib/sup/modes/edit-message-mode.rb @@ -216,7 +216,7 @@ protected def parse_file fn File.open(fn) do |f| header = MBox::read_header f - body = f.readlines + body = f.readlines.map { |l| l.chomp } header.delete_if { |k, v| NON_EDITABLE_HEADERS.member? k } header.each { |k, v| header[k] = parse_header k, v } @@ -307,9 +307,8 @@ protected def build_message date m = RMail::Message.new m.header["Content-Type"] = "text/plain; charset=#{$encoding}" - m.body = @body.join - m.body = m.body - m.body += sig_lines.join("\n") unless $config[:edit_signature] + m.body = @body.join_lines + m.body += sig_lines.join_lines unless $config[:edit_signature] ## there are attachments, so wrap body in an attachment of its own unless @attachments.empty? @@ -367,7 +366,7 @@ EOS end f.puts - f.puts sanitize_body(@body.join) + f.puts sanitize_body(@body.join_lines) f.puts sig_lines if full unless $config[:edit_signature] end @@ -412,7 +411,7 @@ private end def top_posting? - @body.join =~ /(\S+)\s*Excerpts from.*\n(>.*\n)+\s*\Z/ + @body.join_lines =~ /(\S+)\s*Excerpts from.*\n(>.*\n)+\s*\Z/ end def sig_lines diff --git a/lib/sup/util.rb b/lib/sup/util.rb index 99e73b4..544859c 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -390,6 +390,12 @@ module Enumerable end class Array + + def join_lines + Redwood::log "Some newlines are there..." if any? { |l| l =~ /\n/ } + map { |l| l.chomp }.join("\n") + end + def flatten_one_level inject([]) { |a, e| a + e } end -- 1.5.5.rc3 From nicolas.pouillard at gmail.com Fri Apr 4 12:10:11 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Fri, 04 Apr 2008 18:10:11 +0200 Subject: [sup-talk] About newlines In-Reply-To: <1207325216-sup-1624@south> References: <1207309393-sup-2829@ausone.inria.fr> <1207325216-sup-1624@south> Message-ID: <1207325378-sup-1676@ausone.inria.fr> Excerpts from William Morgan's message of Fri Apr 04 18:08:02 +0200 2008:> Reformatted excerpts from nicolas.pouillard's message of 2008-04-04:> > I'm hitting a bug concerning forwarding, all newlines get trimmed> > off. I'm trying to fix the bug, but I don't understand if arrays of> > lines are supposed to be ended by newlines or not.> > I don't see this behavior, either in the forward mode buffer or in the> resulting message.> > Newlines shouldn't exist in arrays of lines.> ForwardMode#forward_body_lines is the relevant method. Let me know what> you discover.I hope that my bunch of patches will makes this clear.-- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080404/ca47ba3b/attachment.bin From marc.hartstein at alum.vassar.edu Fri Apr 4 12:16:09 2008 From: marc.hartstein at alum.vassar.edu (Marc Hartstein) Date: Fri, 04 Apr 2008 12:16:09 -0400 Subject: [sup-talk] About newlines In-Reply-To: <1207309393-sup-2829@ausone.inria.fr> References: <1207309393-sup-2829@ausone.inria.fr> Message-ID: <1207325501-sup-8401@cabinet> Excerpts from Nicolas Pouillard's message of Fri Apr 04 08:14:06 -0400 2008: > I'm hitting a bug concerning forwarding, all newlines get trimmed off. I'm > trying to fix the bug, but I don't understand if arrays of lines are supposed > to be ended by newlines or not. After a bit of chat in #sup on freenode, I have a workaround and some comments. Workaround (tested): make sure you instruct your editor to save the temporary file even when you are making no changes. This will force sup to capture the contents of the file, which will include the newlines. New bug: the same bug exists when replying if you don't edit your message before sending (why would you ever do that?) The problem seems to be that when the body of forward/reply messages is built, it is built without a newline terminator at the end of every line. This is infrequently noticed because those newlines get added to the temporary file for editing. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080404/0ecde927/attachment.bin From kendall at clarkparsia.com Fri Apr 4 12:16:40 2008 From: kendall at clarkparsia.com (kendall at clarkparsia.com) Date: Fri, 4 Apr 2008 12:16:40 -0400 (EDT) Subject: [sup-talk] [PATCH] Fix a bug about forwarding that trimmed out newlines. Message-ID: <59971.192.168.1.71.1207325800.webmail@192.168.1.71> On Friday, April 4, 2008 12:09pm, Nicolas Pouillard said: > This seems to happen when one don't touch the forwarded > email. Indeed most of the sup's code tend to assume that > messages body are reprensented using an array of string > *without* a trailing \n, except some parts of the code. I confirm this. It happens to me when I forward messages without editing them. It does not happen to messages that I edit (in any way). Cheers, Kendall From kendall at clarkparsia.com Fri Apr 4 12:17:55 2008 From: kendall at clarkparsia.com (kendall at clarkparsia.com) Date: Fri, 4 Apr 2008 12:17:55 -0400 (EDT) Subject: [sup-talk] About newlines Message-ID: <40985.192.168.1.71.1207325875.webmail@192.168.1.71> This is precisely what my correspondents see when I forward messages w/out editing them from sup -- and they yell at me, which isn't fun. :> Cheers, Kendall PS--Sorry for the top post, but it seemed reasonable here (and I'm not using sup today!). On Friday, April 4, 2008 12:10pm, Nicolas Pouillard said: > _______________________________________________ > sup-talk mailing list > sup-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/sup-talk > Excerpts from William Morgan's message of Fri Apr 04 18:08:02 +0200 2008:> > Reformatted excerpts from nicolas.pouillard's message of 2008-04-04:> > I'm > hitting a bug concerning forwarding, all newlines get trimmed> > off. I'm > trying to fix the bug, but I don't understand if arrays of> > lines are supposed > to be ended by newlines or not.> > I don't see this behavior, either in the > forward mode buffer or in the> resulting message.> > Newlines shouldn't exist in > arrays of lines.> ForwardMode#forward_body_lines is the relevant method. Let me > know what> you discover.I hope that my bunch of patches will makes this clear.-- > Nicolas Pouillard aka Ertai From wmorgan-sup at masanjin.net Fri Apr 4 13:44:53 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Fri, 04 Apr 2008 10:44:53 -0700 Subject: [sup-talk] [PATCH] Fix a bug when forwarding and using crypto. In-Reply-To: <1207324905-7455-1-git-send-email-nicolas.pouillard@gmail.com> References: <1207324905-7455-1-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1207331044-sup-3269@south> Reformatted excerpts from nicolas.pouillard's message of 2008-04-04: > - to_email = (@header["To"] + @header["Cc"] + @header["Bcc"]).map { |p| PersonManager.person_for(p).email } > + to_email = [@header["To"], @header["Cc"], @header["Bcc"]].flatten.compact.map { |p| PersonManager.person_for(p).email } What was the bug? -- William From wmorgan-sup at masanjin.net Fri Apr 4 13:47:31 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Fri, 04 Apr 2008 10:47:31 -0700 Subject: [sup-talk] [PATCH] Fix a bug about forwarding that trimmed out newlines. In-Reply-To: <1207325353-7638-1-git-send-email-nicolas.pouillard@gmail.com> References: <1207325353-7638-1-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1207331132-sup-5937@south> Reformatted excerpts from nicolas.pouillard's message of 2008-04-04: > This seems to happen when one don't touch the forwarded email. Indeed > most of the sup's code tend to assume that messages body are > reprensented using an array of string *without* a trailing \n, except > some parts of the code. I see. I think this patch is the right approach. > This patch enforce that. It could become even more strict by raising > an error instead of logging in join_lines. Does that log message ever get triggered for you? I'd prefer to have an exception thrown, but only if it will never happen. :) -- William From wmorgan-sup at masanjin.net Fri Apr 4 13:48:01 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Fri, 04 Apr 2008 10:48:01 -0700 Subject: [sup-talk] [PATCH] fixed off-by-one error in imap.rb and maildir.rb In-Reply-To: <1207240457-sup-91@spooky.local> References: <1204528063-sup-7345@chris-tablet> <1204531233-2092-1-git-send-email-chrisw@rice.edu> <1206547432-sup-4074@south> <1207240457-sup-91@spooky.local> Message-ID: <1207331259-sup-2952@south> Reformatted excerpts from Grant Hollingworth's message of 2008-04-03: > This breaks Source#done?, so every poll the last message of each > source gets reloaded. The state gets fixed from the index but it's > still ugly. Gah. I will take a look. -- William From marc.hartstein at alum.vassar.edu Fri Apr 4 15:51:47 2008 From: marc.hartstein at alum.vassar.edu (Marc Hartstein) Date: Fri, 4 Apr 2008 15:51:47 -0400 Subject: [sup-talk] [PATCH] Add tab-completion to multi add labels (;l) Message-ID: <1207338707-2047-1-git-send-email-marc.hartstein@alum.vassar.edu> --- lib/sup/modes/thread-index-mode.rb | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index e24d7e0..0f9d12d 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -440,9 +440,8 @@ EOS end def multi_edit_labels threads - answer = BufferManager.ask :add_labels, "add labels: " - return unless answer - user_labels = answer.split(/\s+/).map { |l| l.intern } + user_labels = BufferManager.ask_for_labels :add_labels, "Add labels: ", [], @hidden_labels + return unless user_labels hl = user_labels.select { |l| @hidden_labels.member? l } if hl.empty? -- 1.5.3.7 From marc.hartstein at alum.vassar.edu Fri Apr 4 17:43:44 2008 From: marc.hartstein at alum.vassar.edu (Marc Hartstein) Date: Fri, 04 Apr 2008 17:43:44 -0400 Subject: [sup-talk] Workaround for sup-config crash in 0.4 on some platforms Message-ID: <1207345193-sup-7377@cabinet> Some users have been having trouble where sup-config crashes on a stock 0.4 install. While updating to git is supposed to correct this problem, many people won't want to go to that effort just to see if sup even works. For them, this workaround: 1. Create and edit ~/.sup/config.yaml to contain the following: -------------------- SNIP HERE -------------------- --- :accounts: :default: :name: foo :email: foo at bar -------------------- SNIP HERE -------------------- 2. Run sup-config as normal. ( This has been crossposted to http://sup.rubyforge.org/wiki/wiki.pl?WorkAroundSupConfigCrash ) Hope this helps somebody. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080404/0ca096c2/attachment.bin From its.jeff.balogh at gmail.com Sat Apr 5 01:48:14 2008 From: its.jeff.balogh at gmail.com (Jeff Balogh) Date: Sat, 05 Apr 2008 01:48:14 -0400 Subject: [sup-talk] Setting reply to -- hook or config? Message-ID: <1207373363-sup-374@archie> I'm terrible at remembering to reply to all, and today I realized that sup can help! I started off making a reply-to hook that takes the array of types sup is planning to offer in the Reply To field. I thought the hook would do some fancy logic and return the right type. Then I realized I could just list the order of my reply-to preferences, and pick the first element of the intersection. ([:list, :all] & types)[0] The return value is only used if it's in the types array, so no worries about nil. A hook seems like overkill for this one-liner, so maybe it would be more appropriate for config.yaml? It makes sense as something in config, but I hesitate because it would be the first code object (well, the first that _looks_ like code), and because less config variables is good. -- jeff From nicolas.pouillard at gmail.com Sat Apr 5 05:26:19 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Sat, 05 Apr 2008 11:26:19 +0200 Subject: [sup-talk] [PATCH] Fix a bug about forwarding that trimmed out newlines. In-Reply-To: <1207331132-sup-5937@south> References: <1207325353-7638-1-git-send-email-nicolas.pouillard@gmail.com> <1207331132-sup-5937@south> Message-ID: <1207387471-sup-7303@ausone.local> Excerpts from William Morgan's message of Fri Apr 04 19:47:31 +0200 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-04-04: > > This seems to happen when one don't touch the forwarded email. Indeed > > most of the sup's code tend to assume that messages body are > > reprensented using an array of string *without* a trailing \n, except > > some parts of the code. > > I see. I think this patch is the right approach. > > > This patch enforce that. It could become even more strict by raising > > an error instead of logging in join_lines. > > Does that log message ever get triggered for you? I'd prefer to have an > exception thrown, but only if it will never happen. :) I will change it to an exception for some time, and if it's good, I will submit a patch. For now I think this patch is the safe way. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 286 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080405/6d0c0693/attachment.bin From nicolas.pouillard at gmail.com Sat Apr 5 06:39:29 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Sat, 05 Apr 2008 12:39:29 +0200 Subject: [sup-talk] [PATCH] Fix a bug when forwarding and using crypto. In-Reply-To: <1207331044-sup-3269@south> References: <1207324905-7455-1-git-send-email-nicolas.pouillard@gmail.com> <1207331044-sup-3269@south> Message-ID: <1207391796-sup-2972@ausone.local> Excerpts from William Morgan's message of Fri Apr 04 19:44:53 +0200 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-04-04: > > - to_email = (@header["To"] + @header["Cc"] + @header["Bcc"]).map { |p| PersonManager.person_for(p).email } > > + to_email = [@header["To"], @header["Cc"], @header["Bcc"]].flatten.compact.map { |p| PersonManager.person_for(p).email } > > What was the bug? When some of these @header[...] are not present I get a nil and then get an error when using '+' on them. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080405/863f13ca/attachment.bin From wmorgan-sup at masanjin.net Sat Apr 5 19:35:13 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Sat, 05 Apr 2008 16:35:13 -0700 Subject: [sup-talk] ISO 8859-15 at the header In-Reply-To: <20080403140711.GA482@weisshuhn.de> References: <20080327044901.GA12106@weisshuhn.de> <1207185125-sup-9342@south> <20080403140711.GA482@weisshuhn.de> Message-ID: <1207438404-sup-888@south> Reformatted excerpts from Carsten Sch?lzki's message of 2008-04-03: > William Morgan [03.04.2008 03:12]: > > It should work, if you have your LANG and stuff all set up > > correctly. What console character set encoding does Sup detect? > > (Typically the first message of the log buffer.) > > The detecting seems right to me. The log says: using character set > encoding "ISO8859-15" This means that as far as Sup can tell, it can emit iso8859-15 directly to the terminal and not have to worry about transcoding anything. Does that seem correct? If so, then this may bring us to the very scary world of "why isn't ncurses does the right thing on my particular platform/terminal/encoding setup". -- William From wmorgan-sup at masanjin.net Sat Apr 5 20:04:34 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Sat, 05 Apr 2008 17:04:34 -0700 Subject: [sup-talk] Wiki updates, more people on #sup In-Reply-To: <18635-64358@sneakemail.com> References: <18635-64358@sneakemail.com> Message-ID: <1207440240-sup-2556@south> Reformatted excerpts from Guarded Identity's message of 2008-03-28: > One thing to note about these configurations are that I'm relying on > other tools to solve problems rather than asking William to "improve" > Sup. That's what makes you a good user. :) > However, regarding [2], I guess I wish that contact tab-complete could > be customizable (say to hook into ldbdq). I've just added an extra-contact-addresses hook. Try parsing some lbdbq output in that. -- William From wmorgan-sup at masanjin.net Sat Apr 5 20:06:28 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Sat, 05 Apr 2008 17:06:28 -0700 Subject: [sup-talk] Workaround for sup-config crash in 0.4 on some platforms In-Reply-To: <1207345193-sup-7377@cabinet> References: <1207345193-sup-7377@cabinet> Message-ID: <1207440368-sup-9724@south> Reformatted excerpts from Marc Hartstein's message of 2008-04-04: > While updating to git is supposed to correct this problem, many people > won't want to go to that effort just to see if sup even works. Guess that means it's time to release an 0.5! -- William From patroclo7 at gmail.com Sun Apr 6 07:06:55 2008 From: patroclo7 at gmail.com (Giorgio Lando) Date: Sun, 06 Apr 2008 13:06:55 +0200 Subject: [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup In-Reply-To: <12072321792626-git-send-email-nicolas.pouillard@gmail.com> References: <12072321792626-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1207479958-sup-5202@clarabella> Excerpts from Nicolas Pouillard's message of Thu Apr 03 16:16:19 +0200 2008: > More precisely new destinations are: > - ~/.sup/exception-log.txt > - ~/.sup/unable-to-decode.txt > This patch avoid some kind of pollution. I really enjoy this patch, my home folder is now cleaner! Thanks -- Giorgio Lando From grant at antiflux.org Mon Apr 7 13:19:20 2008 From: grant at antiflux.org (Grant Hollingworth) Date: Mon, 07 Apr 2008 13:19:20 -0400 Subject: [sup-talk] Wiki updates, more people on #sup In-Reply-To: <1207440240-sup-2556@south> References: <18635-64358@sneakemail.com> <1207440240-sup-2556@south> Message-ID: <1207588490-sup-9579@spooky.local> * William Morgan [2008-04-05 20:04 -0400]: > I've just added an extra-contact-addresses hook. Try parsing some lbdbq > output in that. I made an extra-contact-addresses hook for OS X. Sup's contact completion structure means the script has to load all contacts, but it's still pretty quick. The code uses RubyCocoa and the AddressBook framework, so it works even when the Address Book application is not running. -------------- next part -------------- A non-text attachment was scrubbed... Name: extra-contact-addresses.rb Type: application/octet-stream Size: 1640 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080407/7e19ee82/attachment-0001.obj From wmorgan-sup at masanjin.net Mon Apr 7 14:00:18 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Mon, 07 Apr 2008 11:00:18 -0700 Subject: [sup-talk] Wiki updates, more people on #sup In-Reply-To: <1207588490-sup-9579@spooky.local> References: <18635-64358@sneakemail.com> <1207440240-sup-2556@south> <1207588490-sup-9579@spooky.local> Message-ID: <1207591166-sup-6613@south> Reformatted excerpts from Grant Hollingworth's message of 2008-04-07: > I made an extra-contact-addresses hook for OS X. Sup's contact > completion structure means the script has to load all contacts, but > it's still pretty quick. It would be possible to hook more directly into the completion code if you can provide prefix matches, and not terribly harder. -- William From rgh at roughage.com.au Wed Apr 9 06:07:36 2008 From: rgh at roughage.com.au (Richard Heycock) Date: Wed, 09 Apr 2008 20:07:36 +1000 Subject: [sup-talk] Spam hooks. Message-ID: <1207735298-sup-7690@wrasse> I usr dspam as my anti-spam filter and I have it set up so that if I forward a spam message to spam at domain it retrains the spam filter. Is it possible to add a hook so that when I press 'S' to mark the message as spam that it then forward the email to the appropriate address. rgh -- +61 (0) 410 646 369 rgh at neoss.com.au You're worried criminals will continue to penetrate into cyberspace, and I'm worried complexity, poor design and mismanagement will be there to meet them - Marcus Ranum !DSPAM:47fc9568198723040813034! From itaylor at uark.edu Wed Apr 9 06:19:22 2008 From: itaylor at uark.edu (Ian Taylor) Date: Wed, 09 Apr 2008 06:19:22 -0400 Subject: [sup-talk] Spam hooks. In-Reply-To: <1207735298-sup-7690@wrasse> References: <1207735298-sup-7690@wrasse> Message-ID: <1207736247-sup-6263@red> Excerpts from Richard Heycock's message of Wed Apr 09 06:07:36 -0400 2008: > I usr dspam as my anti-spam filter and I have it set up so that if > I forward a spam message to spam at domain it retrains the spam filter. > > Is it possible to add a hook so that when I press 'S' to mark the > message as spam that it then forward the email to the appropriate > address. > > rgh > > -- > +61 (0) 410 646 369 > rgh at neoss.com.au > > You're worried criminals will continue to penetrate into cyberspace, and > I'm worried complexity, poor design and mismanagement will be there to meet > them - Marcus Ranum > > !DSPAM:47fc9568198723040813034! > Is there any way you could document your spam filtering setup on the wiki? http://sup.rubyforge.org/wiki/wiki.pl -- Ian Taylor From marcus-sup at bar-coded.net Wed Apr 9 16:00:38 2008 From: marcus-sup at bar-coded.net (Marcus Williams) Date: Wed, 09 Apr 2008 21:00:38 +0100 Subject: [sup-talk] Spam hooks. In-Reply-To: <1207735298-sup-7690@wrasse> References: <1207735298-sup-7690@wrasse> Message-ID: <1207771005-sup-8074@tomsk> On 9.4.2008, Richard Heycock wrote: > Is it possible to add a hook so that when I press 'S' to mark the > message as spam that it then forward the email to the appropriate > address. Note that 'S' is actually marking a thread as a spam _not_ a message as a spam so any hook would be working on (potentially) a set of messages. In my local edits I have a hook that allows for this, but its not going to forward anything for you - it leaves it up to you to do what you want with the thread. It wouldnt be that hard to iterate over the thread and forward all messages to an address in ruby though. I can clean it up and post it if its any help. Marcus From rgh at roughage.com.au Wed Apr 9 17:08:46 2008 From: rgh at roughage.com.au (Richard Heycock) Date: Thu, 10 Apr 2008 07:08:46 +1000 Subject: [sup-talk] Spam hooks. In-Reply-To: <1207771005-sup-8074@tomsk> References: <1207735298-sup-7690@wrasse> <1207771005-sup-8074@tomsk> Message-ID: <1207775231-sup-6370@wrasse> Excerpts from Marcus Williams's message of Thu Apr 10 06:00:38 +1000 2008: > On 9.4.2008, Richard Heycock wrote: > > Is it possible to add a hook so that when I press 'S' to mark the > > message as spam that it then forward the email to the appropriate > > address. > > Note that 'S' is actually marking a thread as a spam _not_ a message > as a spam so any hook would be working on (potentially) a set of > messages. Yeah, ok. > In my local edits I have a hook that allows for this, but its not > going to forward anything for you - it leaves it up to you to do what > you want with the thread. It wouldnt be that hard to iterate over the > thread and forward all messages to an address in ruby though. > > I can clean it up and post it if its any help. That would be great. I just need the basic idea and I should be able to take it form there. rgh > Marcus -- +61 (0) 410 646 369 rgh at neoss.com.au You're worried criminals will continue to penetrate into cyberspace, and I'm worried complexity, poor design and mismanagement will be there to meet them - Marcus Ranum !DSPAM:47fd305e198721115333888! From wmorgan-sup at masanjin.net Thu Apr 10 00:05:55 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Wed, 09 Apr 2008 21:05:55 -0700 Subject: [sup-talk] Spam hooks. In-Reply-To: <1207771005-sup-8074@tomsk> References: <1207735298-sup-7690@wrasse> <1207771005-sup-8074@tomsk> Message-ID: <1207800329-sup-6044@south> Reformatted excerpts from Marcus Williams's message of 2008-04-09: > In my local edits I have a hook that allows for this, but its not > going to forward anything for you - it leaves it up to you to do what > you want with the thread. It wouldnt be that hard to iterate over the > thread and forward all messages to an address in ruby though. I'd be happy to merge in such a hook if you want to send a patch. -- William From marcus-sup at bar-coded.net Thu Apr 10 06:31:55 2008 From: marcus-sup at bar-coded.net (Marcus Williams) Date: Thu, 10 Apr 2008 11:31:55 +0100 Subject: [sup-talk] [PATCH] Simple hook that runs when thread is marked as spam Message-ID: <1207823457-sup-5040@tomsk> This hook adds the ability to configure further actions that take place when a user marks a thread as spam in sup. mark-as-spam ------------ File: $HOME/.sup/hooks/mark-as-spam.rb This hook is run when a thread is marked as spam Variables: thread: The message thread being marked as spam. --- lib/sup/modes/thread-index-mode.rb | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 7a0b815..50dabaa 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -13,6 +13,12 @@ Generates the per-thread size widget for each thread. Variables: thread: The message thread to be formatted. EOS + + HookManager.register "mark-as-spam", < t) end ## both spam and deleted have the curious characteristic that you -- 1.5.3.7 From marcus-sup at bar-coded.net Thu Apr 10 06:37:36 2008 From: marcus-sup at bar-coded.net (Marcus Williams) Date: Thu, 10 Apr 2008 11:37:36 +0100 Subject: [sup-talk] Spam hooks. In-Reply-To: <1207775231-sup-6370@wrasse> References: <1207735298-sup-7690@wrasse> <1207771005-sup-8074@tomsk> <1207775231-sup-6370@wrasse> Message-ID: <1207823540-sup-3480@tomsk> On 9.4.2008, Richard Heycock wrote: > That would be great. I just need the basic idea and I should be able > to take it form there. ... patch is winging its way to sup-talk as I write this. Its against next but it should patch cleanly against master. Some quick pointers for the mark-as-spam.rb: # ---- $HOME/.sup/hooks/mark-as-spam.rb ------ # simple actions on spam - use in hook and receive lots of logging # when you hit 'S' :) # # Sup marks a thread as spam, not a single message so this hook # gets a thread passed to it. log "Thread subject is #{thread.subj}" log "Thread authors are #{thread.authors.join ', '}" # latest message log "Latest message in thread is #{thread.latest_message.subj}" # all messages thread.each { |m, *d| log "Look a message #{m.id}" if m } # When you have a message object, you can do something with a complete # message using the raw_* methods (untested..) # File.open(filename, "w") do |f| # m.each_raw_message_line { |l| f.print l } # end # # ... now process the file somehow # EOF -- $HOME/.sup/hooks/mark-as-spam.rb ------ HTH Marcus From marcus-sup at bar-coded.net Thu Apr 10 07:04:32 2008 From: marcus-sup at bar-coded.net (Marcus Williams) Date: Thu, 10 Apr 2008 12:04:32 +0100 Subject: [sup-talk] Spam hooks. In-Reply-To: <1207823540-sup-3480@tomsk> References: <1207735298-sup-7690@wrasse> <1207771005-sup-8074@tomsk> <1207775231-sup-6370@wrasse> <1207823540-sup-3480@tomsk> Message-ID: <1207825216-sup-4659@tomsk> On 10.4.2008, I wrote: > On 9.4.2008, Richard Heycock wrote: > > That would be great. I just need the basic idea and I should be able > > to take it form there. > > ... patch is winging its way to sup-talk as I write this. Its against > next but it should patch cleanly against master. Some quick pointers > for the mark-as-spam.rb: Note that perhaps I should also add that this hook gets run on "toggle" of the spam flag. So you probably want to check which way its been toggled by looking for the :spam flag in the labels set if you want to be extra careful. I think you can probably just use the thread object's labels to do this. Marcus From rgh at roughage.com.au Thu Apr 10 09:05:15 2008 From: rgh at roughage.com.au (Richard Heycock) Date: Thu, 10 Apr 2008 23:05:15 +1000 Subject: [sup-talk] Spam hooks. In-Reply-To: <1207800329-sup-6044@south> References: <1207735298-sup-7690@wrasse> <1207771005-sup-8074@tomsk> <1207800329-sup-6044@south> Message-ID: <1207832683-sup-5657@wrasse> Excerpts from William Morgan's message of Thu Apr 10 14:05:55 +1000 2008: > Reformatted excerpts from Marcus Williams's message of 2008-04-09: > > In my local edits I have a hook that allows for this, but its not > > going to forward anything for you - it leaves it up to you to do what > > you want with the thread. It wouldnt be that hard to iterate over the > > thread and forward all messages to an address in ruby though. > > I'd be happy to merge in such a hook if you want to send a patch. Sounds good. I'll give it a go over the weekend. rgh -- +61 (0) 410 646 369 rgh at neoss.com.au You're worried criminals will continue to penetrate into cyberspace, and I'm worried complexity, poor design and mismanagement will be there to meet them - Marcus Ranum !DSPAM:47fe108b198728455610660! From rgh at roughage.com.au Thu Apr 10 09:09:04 2008 From: rgh at roughage.com.au (Richard Heycock) Date: Thu, 10 Apr 2008 23:09:04 +1000 Subject: [sup-talk] Spam hooks. In-Reply-To: <1207825216-sup-4659@tomsk> References: <1207735298-sup-7690@wrasse> <1207771005-sup-8074@tomsk> <1207775231-sup-6370@wrasse> <1207823540-sup-3480@tomsk> <1207825216-sup-4659@tomsk> Message-ID: <1207832718-sup-7937@wrasse> Excerpts from Marcus Williams's message of Thu Apr 10 21:04:32 +1000 2008: > On 10.4.2008, I wrote: > > On 9.4.2008, Richard Heycock wrote: > > > That would be great. I just need the basic idea and I should be able > > > to take it form there. > > > > ... patch is winging its way to sup-talk as I write this. Its against > > next but it should patch cleanly against master. Some quick pointers > > for the mark-as-spam.rb: I had a quick look and it doesn't seem too onerous. > Note that perhaps I should also add that this hook gets run on "toggle" > of the spam flag. So you probably want to check which way its been > toggled by looking for the :spam flag in the labels set if you want to > be extra careful. I think you can probably just use the thread > object's labels to do this. Ok. dspam allows you to also retrain on false positives as well so it would be worth detecting which way the spam toggle was and either send a message to spam if it's spam and ham if it's not. rgh > Marcus -- +61 (0) 410 646 369 rgh at neoss.com.au You're worried criminals will continue to penetrate into cyberspace, and I'm worried complexity, poor design and mismanagement will be there to meet them - Marcus Ranum !DSPAM:47fe1170198729375562959! From marc.hartstein at alum.vassar.edu Thu Apr 10 11:39:36 2008 From: marc.hartstein at alum.vassar.edu (Marc Hartstein) Date: Thu, 10 Apr 2008 11:39:36 -0400 Subject: [sup-talk] Workaround for sup-config crash in 0.4 on some platforms In-Reply-To: <1207440368-sup-9724@south> References: <1207345193-sup-7377@cabinet> <1207440368-sup-9724@south> Message-ID: <1207841677-sup-2645@cabinet> Excerpts from William Morgan's message of Sat Apr 05 20:06:28 -0400 2008: > Reformatted excerpts from Marc Hartstein's message of 2008-04-04: > > While updating to git is supposed to correct this problem, many people > > won't want to go to that effort just to see if sup even works. > > Guess that means it's time to release an 0.5! Good idea. I've just confirmed that this problem is fixed in 'master' on my Gentoo system. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 235 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080410/d9cf310f/attachment.bin From chrisw at rice.edu Thu Apr 10 16:41:35 2008 From: chrisw at rice.edu (Christopher Warrington) Date: Thu, 10 Apr 2008 15:41:35 -0500 Subject: [sup-talk] Removing label from thread on message arrival Message-ID: <1207859954-sup-8798@chris-tablet> I'd like to automatically remove a certain label from threads when a new message for that thread arrives. What I am trying to do is label threads that I need a reply with the label "nr". Then, when a reply comes in, remove the "nr" label automatically. That way, I don't have to do this manually and my "nr" listing is up-to-date. I don't see any way to do this with a current hook, but I though that I would ask before hacking sup. -- Christopher Warrington From wmorgan-sup at masanjin.net Thu Apr 10 17:09:56 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Thu, 10 Apr 2008 14:09:56 -0700 Subject: [sup-talk] Removing label from thread on message arrival In-Reply-To: <1207859954-sup-8798@chris-tablet> References: <1207859954-sup-8798@chris-tablet> Message-ID: <1207861332-sup-505@south> Reformatted excerpts from Christopher Warrington's message of 2008-04-10: > I don't see any way to do this with a current hook, but I though that > I would ask before hacking sup. Yeah, I think this would require an "after-message-threaded" (or something) hook that would pass in both a message and its thread. -- William From fedzor at gmail.com Mon Apr 14 10:20:53 2008 From: fedzor at gmail.com (fedzor) Date: Mon, 14 Apr 2008 10:20:53 -0400 Subject: [sup-talk] Searching message content Message-ID: Is there a way (already) that I can search the body of my messages? Is this not feasible/practical/permitted-according-to-the-religious- doctrine-of-MUAs ? I'd be glad to write something to get it to work, if need be. -------------------------------------------------------| ~ Ari seydar: it's like a crazy love triangle of Kernel commands and C code From johnbent at lanl.gov Mon Apr 14 10:45:47 2008 From: johnbent at lanl.gov (John Bent) Date: Mon, 14 Apr 2008 08:45:47 -0600 Subject: [sup-talk] Searching message content In-Reply-To: References: Message-ID: <1208183994-sup-8800@tangerine.lanl.gov> Excerpts from fedzor's message of Mon Apr 14 08:20:53 -0600 2008: > Is there a way (already) that I can search the body of my messages? > Is this not feasible/practical/permitted-according-to-the-religious- > doctrine-of-MUAs ? > You can search the body of messages just by doing an unlabeled search. Just hit \ and then type your search phrase and it will search the body of messages. Not sure whether it will also search subjects. But you can explicitly search them by doing subject:whatever search. I don't know the full list of search categories (probably a quick code read would find it), but here are several: subject: to: from: is: (e.g. is:unread) on: (e.g. on:today) Also, doing multiples (e.g. is:unread label:sent) does the logical AND. Not sure how to do OR though. You can enclose search phrases in quotes and, like I said before, not specifying a category (and not doing a colon) searches message bodies. John From nicolas.pouillard at gmail.com Mon Apr 14 10:46:57 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Mon, 14 Apr 2008 16:46:57 +0200 Subject: [sup-talk] Searching message content In-Reply-To: References: Message-ID: <1208184311-sup-4423@ausone.inria.fr> Excerpts from thefed's message of Mon Apr 14 16:20:53 +0200 2008: > Is there a way (already) that I can search the body of my messages? > Is this not feasible/practical/permitted-according-to-the-religious- > doctrine-of-MUAs ? The point about sup is too be able to practically have a working fulltext search. > I'd be glad to write something to get it to work, if need be. Just press '\' and then your query (if you have an old version of Sup it's '/' that is now dedicated to the in-buffer search). Regards, -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080414/3e92e99f/attachment.bin From chris at hinterland.nu Tue Apr 15 02:15:05 2008 From: chris at hinterland.nu (Christopher Marsh) Date: Tue, 15 Apr 2008 07:15:05 +0100 Subject: [sup-talk] Configuration problems with sup Message-ID: Hi. I'm having trouble getting sup working. I'm on Mac OS X 10.5.2, using the git repo. The binaries and libraries link up fine. sup-add throws this error: |---> sup-add mbox:/Volumes/Mail/mail01.mbox --unusual -- archive ~ [Tue Apr 15 06:59:58 +0100 2008] using character set encoding "UTF-8" [Tue Apr 15 07:00:01 +0100 2008] crypto: detected gpg binary in /opt/ local/bin/gpg [Tue Apr 15 07:00:01 +0100 2008] locking /Users/bear/.sup/lock... Adding mbox:/Volumes/Mail/mail01.mbox... [Tue Apr 15 07:00:02 +0100 2008] saving index and sources... /opt/local/lib/ruby/site_ruby/1.8/sup.rb:76:in `initialize': can't convert File::Stat into Integer (TypeError) from /opt/local/lib/ruby/site_ruby/1.8/sup.rb:76:in `open' from /opt/local/lib/ruby/site_ruby/1.8/sup.rb:76:in `save_yaml_obj' from /opt/local/lib/ruby/site_ruby/1.8/sup/index.rb:519:in `save_sources' from /opt/local/lib/ruby/site_ruby/1.8/sup/index.rb:115:in `save' from /Users/bear/Sys/all/sup-add:120 Same whatever mbox I use. Then sup is also broken: --- RuntimeError from thread: load threads for thread-index-mode invalid source 2 /opt/local/lib/ruby/site_ruby/1.8/sup/index.rb:325:in `build_message' /opt/local/lib/ruby/site_ruby/1.8/sup/index.rb:228:in `each_id_by_date' /opt/local/lib/ruby/site_ruby/1.8/sup/thread.rb:330:in `call' /opt/local/lib/ruby/site_ruby/1.8/sup/thread.rb:330:in `load_n_threads' /opt/local/lib/ruby/site_ruby/1.8/sup/index.rb:228:in `each_id_by_date' /opt/local/lib/ruby/site_ruby/1.8/sup/index.rb:228:in `each' /opt/local/lib/ruby/site_ruby/1.8/sup/index.rb:228:in `each_id_by_date' /opt/local/lib/ruby/site_ruby/1.8/sup/thread.rb:326:in `load_n_threads' /opt/local/lib/ruby/site_ruby/1.8/sup/modes/thread-index-mode.rb: 493:in `__unprotected_load_n_threads' (eval):12:in `load_n_threads' /opt/local/lib/ruby/site_ruby/1.8/sup/modes/thread-index-mode.rb: 477:in `load_n_threads_background' /opt/local/lib/ruby/site_ruby/1.8/sup.rb:60:in `reporting_thread' /opt/local/lib/ruby/site_ruby/1.8/sup.rb:58:in `initialize' /opt/local/lib/ruby/site_ruby/1.8/sup.rb:58:in `new' /opt/local/lib/ruby/site_ruby/1.8/sup.rb:58:in `reporting_thread' /opt/local/lib/ruby/site_ruby/1.8/sup/modes/thread-index-mode.rb: 476:in `load_n_threads_background' /opt/local/lib/ruby/site_ruby/1.8/sup/modes/thread-index-mode.rb: 546:in `__unprotected_load_threads' (eval):12:in `load_threads' /Users/bear/Sys/all/sup:200 I presume the one is a consequence of the other, but I don't know how to fix it. Can you help? Chris From chris at hinterland.nu Tue Apr 15 02:18:26 2008 From: chris at hinterland.nu (Christopher Marsh) Date: Tue, 15 Apr 2008 07:18:26 +0100 Subject: [sup-talk] Configuration problems with sup [2] Message-ID: <0E731DC9-3C5D-4A1C-909A-2949977D0F71@hinterland.nu> Incidentally, the 974 messages sup was showing were the consequence of a previous attempt to get it working. The mailbox referred to in the error log has ~20,000 messages in it. I considered deleting the index, but couldn't find it. Chris From marc.hartstein at alum.vassar.edu Tue Apr 15 11:03:58 2008 From: marc.hartstein at alum.vassar.edu (Marc Hartstein) Date: Tue, 15 Apr 2008 11:03:58 -0400 Subject: [sup-talk] Configuration problems with sup In-Reply-To: References: Message-ID: <1208271683-sup-8416@cabinet> Excerpts from Christopher Marsh's message of Tue Apr 15 02:15:05 -0400 2008: > > |---> sup-add mbox:/Volumes/Mail/mail01.mbox --unusual -- > archive I've found that I have to use URIs of the form :// Try sup-add --unusual --archive mbox:///Volumes/Mail/mail01.mbox (Note that help says options should come first; I don't know if it actually cares.) If that doesn't work, hopefully someone more knowledgeable will come along soon. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 235 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080415/450b6d9b/attachment.bin From wmorgan-sup at masanjin.net Tue Apr 15 12:23:37 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 15 Apr 2008 09:23:37 -0700 Subject: [sup-talk] Configuration problems with sup In-Reply-To: References: Message-ID: <1208275597-sup-4934@south> Reformatted excerpts from Christopher Marsh's message of 2008-04-14: > /opt/local/lib/ruby/site_ruby/1.8/sup.rb:76:in `initialize': can't convert File::Stat into Integer (TypeError) Interesting. You've uncovered a legitimate bug in Sup, but it's a bug that remains hidden until you have just the right combination of wrong things. You have a couple easy workarounds available to you. If you "mv ~/.sup/sources.yaml.bak ~/.sup/sources.yaml", that should fix it. You could also delete the entire ~/.sup directory, if you feel like starting afresh. I've also fixed the bug in git master. -- William From wmorgan-sup at masanjin.net Tue Apr 15 12:26:43 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 15 Apr 2008 09:26:43 -0700 Subject: [sup-talk] Configuration problems with sup [2] In-Reply-To: <0E731DC9-3C5D-4A1C-909A-2949977D0F71@hinterland.nu> References: <0E731DC9-3C5D-4A1C-909A-2949977D0F71@hinterland.nu> Message-ID: <1208276624-sup-9670@south> Reformatted excerpts from Christopher Marsh's message of 2008-04-14: > Incidentally, the 974 messages sup was showing were the consequence of > a previous attempt to get it working. The mailbox referred to in the > error log has ~20,000 messages in it. I considered deleting the index, > but couldn't find it. It's in ~/.sup/ferret. If you have no labels you want to keep, you can delete that directory and sup-sync --all --all-sources to rebuild it. Once your sources.yaml problem is fixed, of course. :) -- William From miles at byu.net Tue Apr 15 18:30:37 2008 From: miles at byu.net (Miles Pomeroy) Date: Tue, 15 Apr 2008 15:30:37 -0700 Subject: [sup-talk] Gmail IMAP with sup Message-ID: <6038aa2a0804151530uae50bbbxc6b8eed49906fcf8@mail.gmail.com> Setup: I'm a new user of sup trying use it will my gmail account. I set it up using imaps://imap.gmail.com:993/INBOX. Sup went through and indexed the 2000 some odd emails in my inbox and then present them to me just fine, great. The problem: 1. When new mail come in sup downloads it but it is not marked new. At least not in anyway that I can distinguish from other messages. 2. When I look at those messages and then go back to gmail through the browser, those messages are not marked as being read. The question: Does anyone else use gmail imap with sup? If so did you set it up differently than I? Am I doing something wrong? Is there any tutorial for setting up gmail imap specifically for sup? Thanks, Miles. From its.jeff.balogh at gmail.com Tue Apr 15 21:46:45 2008 From: its.jeff.balogh at gmail.com (Jeff Balogh) Date: Tue, 15 Apr 2008 21:46:45 -0400 Subject: [sup-talk] Gmail IMAP with sup In-Reply-To: <6038aa2a0804151530uae50bbbxc6b8eed49906fcf8@mail.gmail.com> References: <6038aa2a0804151530uae50bbbxc6b8eed49906fcf8@mail.gmail.com> Message-ID: <1208309556-sup-3399@archie> Miles Pomeroy wrote: > Setup: > I'm a new user of sup trying use it will my gmail account. I set it up > using imaps://imap.gmail.com:993/INBOX. Sup went through and indexed > the 2000 some odd emails in my inbox and then present them to me just > fine, great. > > The problem: > 1. When new mail come in sup downloads it but it is not marked new. At > least not in anyway that I can distinguish from other messages. I don't know the cause of that. > 2. When I look at those messages and then go back to gmail through the > browser, those messages are not marked as being read. This is part of the sup philosophy. It treats mail sources as dumb stores, and doesn't try to change them. > The question: > Does anyone else use gmail imap with sup? If so did you set it up > differently than I? Am I doing something wrong? Is there any tutorial > for setting up gmail imap specifically for sup? I used to run sup on gmail imap, using the '[Gmail]/All Mail' folder (which you need to url encode as '%5BGmail%5D/All%20Mail'). I got tired of the imap slowness though, and switched to using offlineimap, so I haven't had sup talking to gmail in a while. -- jeff From wmorgan-sup at masanjin.net Wed Apr 16 11:16:57 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Wed, 16 Apr 2008 08:16:57 -0700 Subject: [sup-talk] Gmail IMAP with sup In-Reply-To: <6038aa2a0804151530uae50bbbxc6b8eed49906fcf8@mail.gmail.com> References: <6038aa2a0804151530uae50bbbxc6b8eed49906fcf8@mail.gmail.com> Message-ID: <1208358880-sup-751@south> Reformatted excerpts from Miles Pomeroy's message of 2008-04-15: > 1. When new mail come in sup downloads it but it is not marked new. At > least not in anyway that I can distinguish from other messages. Are these messages already read in Gmail? Sup tries its best to preserve the status of messages that it imports. If not, then that sounds like a legitimate bug. > Does anyone else use gmail imap with sup? If so did you set it up > differently than I? Am I doing something wrong? Is there any tutorial > for setting up gmail imap specifically for sup? There's no tutorial, at least not yet. What Jeff said is best practice at this point---most everyone has switched to offlineimap as an intermediate layer because Gmail (and possibly the Ruby IMAP libraries) isn't fast enough for loading large threads. -- William From kendall at clarkparsia.com Wed Apr 16 11:30:20 2008 From: kendall at clarkparsia.com (Kendall Grant Clark) Date: Wed, 16 Apr 2008 11:30:20 -0400 Subject: [sup-talk] Gmail IMAP with sup In-Reply-To: <1208358880-sup-751@south> References: <6038aa2a0804151530uae50bbbxc6b8eed49906fcf8@mail.gmail.com> <1208358880-sup-751@south> Message-ID: <1208359720-sup-5655@k-desktop.int.clarkparsia.com> Excerpts from William Morgan's message of Wed Apr 16 11:16:57 -0400 2008: > There's no tutorial, at least not yet. What Jeff said is best practice > at this point---most everyone has switched to offlineimap as an > intermediate layer Is there a known-good description of how to switch to offlineimap? I couldn't find anything on the wiki and I don't need to switch until or unless it's not experimental. I'd rather endure some thread slowness than lose mail, etc. -- Cheers, Kendall From marc.hartstein at alum.vassar.edu Wed Apr 16 13:15:09 2008 From: marc.hartstein at alum.vassar.edu (Marc Hartstein) Date: Wed, 16 Apr 2008 13:15:09 -0400 Subject: [sup-talk] Gmail IMAP with sup In-Reply-To: <1208358880-sup-751@south> References: <6038aa2a0804151530uae50bbbxc6b8eed49906fcf8@mail.gmail.com> <1208358880-sup-751@south> Message-ID: <1208366079-sup-486@cabinet> Excerpts from William Morgan's message of Wed Apr 16 11:16:57 -0400 2008: > > There's no tutorial, at least not yet. What Jeff said is best practice > at this point---most everyone has switched to offlineimap as an > intermediate layer because Gmail (and possibly the Ruby IMAP libraries) > isn't fast enough for loading large threads. Just curious, why do people prefer offlineimap to fetchmail (using either IMAP or POP protocols)? Given that sup doesn't write back to the store, so you're not getting the IMAP advantage of sending read status back to the server... -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080416/742bc4f5/attachment.bin From gcw5217 at rice.edu Wed Apr 16 15:02:10 2008 From: gcw5217 at rice.edu (Chris Warrington) Date: Wed, 16 Apr 2008 14:02:10 -0500 (CDT) Subject: [sup-talk] Gmail IMAP with sup In-Reply-To: <1208366079-sup-486@cabinet> References: <6038aa2a0804151530uae50bbbxc6b8eed49906fcf8@mail.gmail.com> <1208358880-sup-751@south> <1208366079-sup-486@cabinet> Message-ID: On Wed, 16 Apr 2008, Marc Hartstein wrote: > Just curious, why do people prefer offlineimap to fetchmail (using > either IMAP or POP protocols)? Given that sup doesn't write back to the > store, so you're not getting the IMAP advantage of sending read status > back to the server... * Easier to setup * Easier to na\:\ively backup * I can sync changes back easily if I modify with a different local client -- Christopher Warrington (away from his normal computer) From marc.hartstein at alum.vassar.edu Thu Apr 17 16:43:29 2008 From: marc.hartstein at alum.vassar.edu (Marc Hartstein) Date: Thu, 17 Apr 2008 16:43:29 -0400 Subject: [sup-talk] [PATCH] Add 'A' archive and mark read command to inbox-mode. Message-ID: <1208465009-5957-1-git-send-email-marc.hartstein@alum.vassar.edu> For some email, the only meaningful content is in the subject line. It is thus useful to be able to dispatch this email with a single command after glancing at it. As 'N' moves the cursor, and 'a' doesn't clear the "unread" flag, it is currently necessary to press "Nka" to do this on a single thread. The 'A' command does this simple task with a single, easy-to-remember, keystroke, but makes it harder to hit accidentally than 'a'. A multi_ mode is supplied. --- lib/sup/modes/inbox-mode.rb | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb index a2de13f..c623f4a 100644 --- a/lib/sup/modes/inbox-mode.rb +++ b/lib/sup/modes/inbox-mode.rb @@ -6,6 +6,7 @@ class InboxMode < ThreadIndexMode register_keymap do |k| ## overwrite toggle_archived with archive k.add :archive, "Archive thread (remove from inbox)", 'a' + k.add :read_and_archive, "Archive thread (remove from inbox) and mark read", 'A' end def initialize @@ -38,6 +39,23 @@ class InboxMode < ThreadIndexMode regen_text end + def read_and_archive + return unless cursor_thread + cursor_thread.remove_label :unread + cursor_thread.remove_label :inbox + hide_thread cursor_thread + regen_text + end + + def multi_read_and_archive threads + threads.each do |t| + t.remove_label :unread + t.remove_label :inbox + hide_thread t + end + regen_text + end + def handle_unarchived_update sender, m add_or_unhide m end -- 1.5.3.7 From marc.hartstein at alum.vassar.edu Thu Apr 17 16:58:29 2008 From: marc.hartstein at alum.vassar.edu (Marc Hartstein) Date: Thu, 17 Apr 2008 16:58:29 -0400 Subject: [sup-talk] [PATCH] polling is now done per source In-Reply-To: <1206786725-5456-1-git-send-email-chrisw@rice.edu> References: <1206784680-sup-3052@chris-tablet> <1206786725-5456-1-git-send-email-chrisw@rice.edu> Message-ID: <1208465750-sup-5733@cabinet> Excerpts from 's message of Sat Mar 29 06:32:05 -0400 2008: > Each source has a poll_interval property. This property is used to > determine whether the source should be polled. The user can still for a > poll of all sources. Thanks for the patch. Seems to work great. Only one problem. When this patch is applied and then sup is run against an old sources.yaml (which doesn't provide the poll_interval property), sup will crash on startup. (Unfortunately, running git master, say to test a patch in development, will clobber sources.yaml and remove this property, so I keep hitting this problem.) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080417/6519cca4/attachment.bin From chrisw at rice.edu Thu Apr 17 18:24:35 2008 From: chrisw at rice.edu (Christopher Warrington) Date: Thu, 17 Apr 2008 17:24:35 -0500 Subject: [sup-talk] [PATCH] polling is now done per source In-Reply-To: <1208465750-sup-5733@cabinet> References: <1206784680-sup-3052@chris-tablet> <1206786725-5456-1-git-send-email-chrisw@rice.edu> <1208465750-sup-5733@cabinet> Message-ID: <1208470560-sup-9902@chris-tablet> Excerpts from Marc Hartstein's message of Thu Apr 17 15:58:29 -0500 2008: >> Each source has a poll_interval property. This property is used to >> determine whether the source should be polled. The user can still >> for a poll of all sources. > Thanks for the patch. Seems to work great. Only one problem. Well, there is another. The before-poll hook doesn't get the correct arguments and before-acct-poll is run twice. I've fixed this locally and will post a patch to the patch (or a unified path) once I figure out how to do that in git. > When this patch is applied and then sup is run against an old > sources.yaml (which doesn't provide the poll_interval property), sup > will crash on startup. Hmmm... I don't know enough about the yaml infrastructure to fix this. Does anyone else know if there is a way to specify a default value when one if not found in the yaml file. This would allow for graceful upgrading and (in theory) keep the sources.yaml file backward compatible. -- Christopher Warrington From wmorgan-sup at masanjin.net Sun Apr 20 18:26:23 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Sun, 20 Apr 2008 15:26:23 -0700 Subject: [sup-talk] Workaround for sup-config crash in 0.4 on some platforms In-Reply-To: <1207841677-sup-2645@cabinet> References: <1207345193-sup-7377@cabinet> <1207440368-sup-9724@south> <1207841677-sup-2645@cabinet> Message-ID: <1208730259-sup-396@south> Reformatted excerpts from Marc Hartstein's message of 2008-04-10: > Excerpts from William Morgan's message of Sat Apr 05 20:06:28 -0400 2008: > > Guess that means it's time to release an 0.5! > > Good idea. I've merged pretty much everything that's been sitting in next into master, in preparation for 0.5. Expect it soon. I've also just published a "bugs" branch for tracking issues and versions with ditz. -- William From nicolas.pouillard at gmail.com Mon Apr 21 04:01:45 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Mon, 21 Apr 2008 10:01:45 +0200 Subject: [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup In-Reply-To: <12072321792626-git-send-email-nicolas.pouillard@gmail.com> References: <12072321792626-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1208764889-sup-5055@ausone.inria.fr> What about applying this patch? Excerpts from Nicolas Pouillard's message of Thu Apr 03 16:16:19 +0200 2008: > More precisely new destinations are: > - ~/.sup/exception-log.txt > - ~/.sup/unable-to-decode.txt > This patch avoid some kind of pollution. > --- > bin/sup | 4 ++-- > lib/sup/message.rb | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/bin/sup b/bin/sup > index 0d34215..a7623de 100644 > --- a/bin/sup > +++ b/bin/sup > @@ -327,7 +327,7 @@ ensure > end > > unless $exceptions.empty? > - File.open("sup-exception-log.txt", "w") do |f| > + File.open(File.join(BASE_DIR, "exception-log.txt"), "w") do |f| > $exceptions.each do |e, name| > f.puts "--- #{e.class.name} from thread: #{name}" > f.puts e.message, e.backtrace > @@ -337,7 +337,7 @@ unless $exceptions.empty? > ---------------------------------------------------------------- > I'm very sorry. It seems that an error occurred in Sup. Please > accept my sincere apologies. If you don't mind, please send the > -contents of sup-exception-log.txt and a brief report of the > +contents of ~/.sup/exception-log.txt and a brief report of the > circumstances to sup-talk at rubyforge dot orgs so that I might > address this problem. Thank you! > > diff --git a/lib/sup/message.rb b/lib/sup/message.rb > index 6a2a9c4..249b6c6 100644 > --- a/lib/sup/message.rb > +++ b/lib/sup/message.rb > @@ -423,7 +423,7 @@ private > Iconv.iconv($encoding + "//IGNORE", charset, body + " ").join[0 .. -2] > rescue Errno::EINVAL, Iconv::InvalidEncoding, Iconv::IllegalSequence, MessageFormatError => e > Redwood::log "warning: error (#{e.class.name}) decoding message body from #{charset}: #{e.message}" > - File.open("sup-unable-to-decode.txt", "w") { |f| f.write body } > + File.open(File.join(BASE_DIR,"unable-to-decode.txt"), "w") { |f| f.write body } > body > end > end -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080421/e75f4850/attachment.bin From nicolas.pouillard at gmail.com Mon Apr 21 04:02:46 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Mon, 21 Apr 2008 10:02:46 +0200 Subject: [sup-talk] [PATCH] Fix a bug about forwarding that trimmed out newlines. In-Reply-To: <1207325353-7638-1-git-send-email-nicolas.pouillard@gmail.com> References: <1207325353-7638-1-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1208764937-sup-2539@ausone.inria.fr> What about this patch? Excerpts from Nicolas Pouillard's message of Fri Apr 04 18:09:13 +0200 2008: > This seems to happen when one don't touch the forwarded > email. Indeed most of the sup's code tend to assume that > messages body are reprensented using an array of string > *without* a trailing \n, except some parts of the code. > > This patch enforce that. It could become even more strict > by raising an error instead of logging in join_lines. > --- > lib/sup/modes/edit-message-mode.rb | 11 +++++------ > lib/sup/util.rb | 6 ++++++ > 2 files changed, 11 insertions(+), 6 deletions(-) > > diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb > index dd96002..c3634af 100644 > --- a/lib/sup/modes/edit-message-mode.rb > +++ b/lib/sup/modes/edit-message-mode.rb > @@ -216,7 +216,7 @@ protected > def parse_file fn > File.open(fn) do |f| > header = MBox::read_header f > - body = f.readlines > + body = f.readlines.map { |l| l.chomp } > > header.delete_if { |k, v| NON_EDITABLE_HEADERS.member? k } > header.each { |k, v| header[k] = parse_header k, v } > @@ -307,9 +307,8 @@ protected > def build_message date > m = RMail::Message.new > m.header["Content-Type"] = "text/plain; charset=#{$encoding}" > - m.body = @body.join > - m.body = m.body > - m.body += sig_lines.join("\n") unless $config[:edit_signature] > + m.body = @body.join_lines > + m.body += sig_lines.join_lines unless $config[:edit_signature] > > ## there are attachments, so wrap body in an attachment of its own > unless @attachments.empty? > @@ -367,7 +366,7 @@ EOS > end > > f.puts > - f.puts sanitize_body(@body.join) > + f.puts sanitize_body(@body.join_lines) > f.puts sig_lines if full unless $config[:edit_signature] > end > > @@ -412,7 +411,7 @@ private > end > > def top_posting? > - @body.join =~ /(\S+)\s*Excerpts from.*\n(>.*\n)+\s*\Z/ > + @body.join_lines =~ /(\S+)\s*Excerpts from.*\n(>.*\n)+\s*\Z/ > end > > def sig_lines > diff --git a/lib/sup/util.rb b/lib/sup/util.rb > index 99e73b4..544859c 100644 > --- a/lib/sup/util.rb > +++ b/lib/sup/util.rb > @@ -390,6 +390,12 @@ module Enumerable > end > > class Array > + > + def join_lines > + Redwood::log "Some newlines are there..." if any? { |l| l =~ /\n/ } > + map { |l| l.chomp }.join("\n") > + end > + > def flatten_one_level > inject([]) { |a, e| a + e } > end -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080421/85e19dca/attachment-0001.bin From nicolas.pouillard at gmail.com Mon Apr 21 04:02:59 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Mon, 21 Apr 2008 10:02:59 +0200 Subject: [sup-talk] [PATCH] Use read instead of readlines.join. In-Reply-To: <1207324856-7408-1-git-send-email-nicolas.pouillard@gmail.com> References: <1207324856-7408-1-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1208764973-sup-7179@ausone.inria.fr> What about this patch? Excerpts from Nicolas Pouillard's message of Fri Apr 04 18:00:56 +0200 2008: > --- > lib/sup/draft.rb | 2 +- > lib/sup/hook.rb | 2 +- > lib/sup/maildir.rb | 2 +- > lib/sup/modes/file-browser-mode.rb | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/lib/sup/draft.rb b/lib/sup/draft.rb > index 81c0044..21de151 100644 > --- a/lib/sup/draft.rb > +++ b/lib/sup/draft.rb > @@ -106,7 +106,7 @@ class DraftLoader < Source > end > > def raw_message offset > - IO.readlines(fn_for_offset(offset)).join > + IO.read(fn_for_offset(offset)) > end > > def start_offset; 0; end > diff --git a/lib/sup/hook.rb b/lib/sup/hook.rb > index 74ecfab..9494919 100644 > --- a/lib/sup/hook.rb > +++ b/lib/sup/hook.rb > @@ -120,7 +120,7 @@ private > unless @hooks.member? name > @hooks[name] = > begin > - returning IO.readlines(fn_for(name)).join do > + returning IO.read(fn_for(name)) do > log "read '#{name}' from #{fn_for(name)}" > end > rescue SystemCallError => e > diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb > index 584e657..620e8e2 100644 > --- a/lib/sup/maildir.rb > +++ b/lib/sup/maildir.rb > @@ -72,7 +72,7 @@ class Maildir < Source > > def raw_message id > scan_mailbox > - with_file_for(id) { |f| f.readlines.join } > + with_file_for(id) { |f| f.read } > end > > def scan_mailbox opts={} > diff --git a/lib/sup/modes/file-browser-mode.rb b/lib/sup/modes/file-browser-mode.rb > index b49f3f4..b92468d 100644 > --- a/lib/sup/modes/file-browser-mode.rb > +++ b/lib/sup/modes/file-browser-mode.rb > @@ -47,7 +47,7 @@ protected > return unless f && f.file? > > begin > - BufferManager.spawn f.to_s, TextMode.new(f.readlines.join) > + BufferManager.spawn f.to_s, TextMode.new(f.read) > rescue SystemCallError => e > BufferManager.flash e.message > end -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080421/86548146/attachment.bin From israel.herraiz at gmail.com Mon Apr 21 16:37:23 2008 From: israel.herraiz at gmail.com (Israel Herraiz) Date: Mon, 21 Apr 2008 22:37:23 +0200 Subject: [sup-talk] System encoding versus messages encoding Message-ID: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com> Hi there, I have been using Sup for a couple of days, and I have found some problems with the encoding of messages written in ISO-8859-1(5). The encoding in my system is en_US.UTF-8, but most of the email that I receive is in Spanish, and usually encoded with ISO-8859-1 (and sometimes with ISO-8859-15). When I start Sup, it detects my UTF-8 and tries to decode the messages with that encoding, that results in hardly readable messages (most of the sentences where wide characters appear are truncated). If I start it with "LANG=en_US.ISO-8859-1 sup" it now detects the new encoding, and the messages are more readable, but I can not see the right characters because my terminal enconding is UTF-8 (but at least the sentences are not truncated). With Mutt (and other email clients), I still use UTF-8 as my system encoding, and I see ISO-8859-1 messages correctly. The encoding of the messages is of course included in the headers. As far as I know (considering what I have read in the documentation and in the archives of this mailing list), Sup determines the encoding using the environment variables and tries to decode all the messages using that encoding. For people working in different languages and environments (like me, I write in English and Spanish, some people send me messages in UTF-8, some other in ISO-88159-1), having an overall encoding for all the messages is not a good solution. Would it possible to decode each message according to its headers? Please correct me if I am wrong in any of my assumptions on how Sup encodes/decodes messages. By the way, I am using the Git version of Sup (as of today :-). Cheers, Israel From shot at hot.pl Tue Apr 22 07:39:59 2008 From: shot at hot.pl (Shot (Piotr Szotkowski)) Date: Tue, 22 Apr 2008 13:39:59 +0200 Subject: [sup-talk] System encoding versus messages encoding In-Reply-To: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com> References: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com> Message-ID: <20080422113959.GA20034@durance.shot.pl> Israel Herraiz: > As far as I know (considering what I have read in the documentation > and in the archives of this mailing list), Sup determines the encoding > using the environment variables and tries to decode all the messages > using that encoding. For people working in different languages and > environments (like me, I write in English and Spanish, some people > send me messages in UTF-8, some other in ISO-88159-1), having an > overall encoding for all the messages is not a good solution. I agree wholeheartedly ? I tried to use Sup a couple of weeks ago, but this issue made it unusable for me (I planned to hack on this some day, but my work and uni obligations do not leave any free time lately). :( To make matters worse, the relevant RFC actually requires emails to be encoded in the ?tightest? encoding possible ? when I?m writing an email in Polish without any non-US-ASCII letters, it should be sent as US-ASCII; if I include Polish diacritical characters, it should be encoded as ISO-8859-2, but if I add some characters outside of it (say, ellipsis) it should be sent in UTF-8. As a result, I regularly receilve emails in US-ASCII, ISO-8859-2 and UTF-8 ? but also in ISO-8859-1, ISO-8859-15, as well as some cyryllic encodings. I remember Mutt going through some growing pains to accomodate this, but has it all sorted out now (there is an issue of recoding the email one replies to to the encoding expected by the editor, for example). I?ll be more than happy to test any work done in this regard and I offer any knowledge that could be useful; unfortunately, I can?t promise any hacking time (I just got accepted for this year?s Summer of Code to hack on CiviCRM internationalisation ? maybe Sup could apply to be a project in next year?s SoC edition?). -- Shot -- I grew up in Europe, where the history comes from. -- Eddie Izzard -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 191 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080422/9e7cc1bf/attachment.bin From wmorgan-sup at masanjin.net Tue Apr 22 13:08:13 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 22 Apr 2008 10:08:13 -0700 Subject: [sup-talk] [ANN] Sup 0.5 Released Message-ID: <1208884075-sup-1123@south> Sup version 0.5 has been released! * Sup is a console-based email client for people with a lot of email. It supports tagging, very fast full-text search, automatic contact- list management, and more. If you're the type of person who treats email as an extension of your long-term memory, Sup is for you. Sup makes it easy to: - Handle massive amounts of email. - Mix email from different sources: mbox files (even across different machines), Maildir directories, IMAP folders, POP accounts, and GMail accounts. - Instantaneously search over your entire email collection. Search over body text, or use a query language to combine search predicates in any way. - Handle multiple accounts. Replying to email sent to a particular account will use the correct SMTP server, signature, and from address. - Add custom code to handle certain types of messages or to handle certain types of text within messages. - Organize email with user-defined labels, automatically track recent contacts, and much more! The goal of Sup is to become the email client of choice for nerds everywhere. Changes: ## 0.5 / 2008-04-22 * new hooks: extra-contact-addresses, startup * '!!' now loads all threads in current search * general state saving speedup * threads with unsent draft messages are now shown in red * --compose spawns a compose-message buffer on startup * Many bugfixes and UI improvements * -- William From david at axiombox.com Tue Apr 22 14:27:25 2008 From: david at axiombox.com (David Moreno) Date: Tue, 22 Apr 2008 14:27:25 -0400 Subject: [sup-talk] [ANN] Sup 0.5 Released In-Reply-To: <1208884075-sup-1123@south> References: <1208884075-sup-1123@south> Message-ID: <1208888023-sup-2851@petunia> Excerpts from William Morgan's message of Tue Apr 22 13:08:13 -0400 2008: > Sup version 0.5 has been released! Geez, nice. Apparently as the time of writing, the gem is still 404 on RubyForge. -- David Moreno http://damog.net/ http://axiombox.com/ From kendall at clarkparsia.com Tue Apr 22 14:36:13 2008 From: kendall at clarkparsia.com (Kendall Grant Clark) Date: Tue, 22 Apr 2008 14:36:13 -0400 Subject: [sup-talk] [ANN] Sup 0.5 Released In-Reply-To: <1208888023-sup-2851@petunia> References: <1208884075-sup-1123@south> <1208888023-sup-2851@petunia> Message-ID: <1208889354-sup-4687@k-desktop.int.clarkparsia.com> Excerpts from David Moreno's message of Tue Apr 22 14:27:25 -0400 2008: > Excerpts from William Morgan's message of Tue Apr 22 13:08:13 -0400 2008: > > Sup version 0.5 has been released! > > Geez, nice. Apparently as the time of writing, the gem is still 404 on > RubyForge. Worked for me about 45 minutes ago; 0.5 seems quite nice. -- Cheers, Kendall From wmorgan-sup at masanjin.net Tue Apr 22 14:37:44 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 22 Apr 2008 11:37:44 -0700 Subject: [sup-talk] [ANN] Sup 0.5 Released In-Reply-To: <1208888023-sup-2851@petunia> References: <1208884075-sup-1123@south> <1208888023-sup-2851@petunia> Message-ID: <1208889336-sup-3574@south> Reformatted excerpts from David Moreno's message of 2008-04-22: > Excerpts from William Morgan's message of Tue Apr 22 13:08:13 -0400 2008: > > Sup version 0.5 has been released! > > Geez, nice. Apparently as the time of writing, the gem is still 404 on > RubyForge. It's not 404 if you download it directly: http://rubyforge.org/frs/download.php/35925/sup-0.5.gem But yes, it typically takes a few hours for RubyForge to propagate to the RubyGems index, so I typically try to wait before sending the announcements, but I typically forget. (Typical!) -- William From david at axiombox.com Tue Apr 22 14:55:01 2008 From: david at axiombox.com (David Moreno) Date: Tue, 22 Apr 2008 14:55:01 -0400 Subject: [sup-talk] [ANN] Sup 0.5 Released In-Reply-To: <1208889336-sup-3574@south> References: <1208884075-sup-1123@south> <1208888023-sup-2851@petunia> <1208889336-sup-3574@south> Message-ID: <1208890451-sup-2414@petunia> Excerpts from William Morgan's message of Tue Apr 22 14:37:44 -0400 2008: > It's not 404 if you download it directly: > http://rubyforge.org/frs/download.php/35925/sup-0.5.gem Got it now with `gem update`. Thanks for your effort! -- David Moreno http://damog.net/ http://axiombox.com/ From rgh at roughage.com.au Tue Apr 22 18:48:12 2008 From: rgh at roughage.com.au (Richard Heycock) Date: Wed, 23 Apr 2008 08:48:12 +1000 Subject: [sup-talk] [ANN] Sup 0.5 Released In-Reply-To: <1208884075-sup-1123@south> References: <1208884075-sup-1123@south> Message-ID: <1208904419-sup-9606@wrasse> Excerpts from William Morgan's message of Wed Apr 23 03:08:13 +1000 2008: > Sup version 0.5 has been released! What a treat for a cold, wet Wednesday morning! Thanks guys. rgh > * > > Sup is a console-based email client for people with a lot of email. > It supports tagging, very fast full-text search, automatic contact- > list management, and more. If you're the type of person who treats > email as an extension of your long-term memory, Sup is for you. > > Sup makes it easy to: > - Handle massive amounts of email. > > - Mix email from different sources: mbox files (even across different > machines), Maildir directories, IMAP folders, POP accounts, and > GMail accounts. > > - Instantaneously search over your entire email collection. Search > over body text, or use a query language to combine search > predicates in any way. > > - Handle multiple accounts. Replying to email sent to a particular > account will use the correct SMTP server, signature, and from > address. > > - Add custom code to handle certain types of messages or to handle > certain types of text within messages. > > - Organize email with user-defined labels, automatically track > recent contacts, and much more! > > The goal of Sup is to become the email client of choice for nerds > everywhere. > > Changes: > > ## 0.5 / 2008-04-22 > * new hooks: extra-contact-addresses, startup > * '!!' now loads all threads in current search > * general state saving speedup > * threads with unsent draft messages are now shown in red > * --compose spawns a compose-message buffer on startup > * Many bugfixes and UI improvements > > * > -- +61 (0) 410 646 369 rgh at neoss.com.au You're worried criminals will continue to penetrate into cyberspace, and I'm worried complexity, poor design and mismanagement will be there to meet them - Marcus Ranum From wmorgan-sup at masanjin.net Tue Apr 22 19:18:00 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 22 Apr 2008 16:18:00 -0700 Subject: [sup-talk] System encoding versus messages encoding In-Reply-To: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com> References: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com> Message-ID: <1208905597-sup-4977@south> Reformatted excerpts from Israel Herraiz's message of 2008-04-21: > As far as I know (considering what I have read in the documentation > and in the archives of this mailing list), Sup determines the encoding > using the environment variables and tries to decode all the messages > using that encoding. This is not correct. Sup DOES determin the message's (or MIME component's) charset, and transcodes it to your terminal charset using the iconv library before display. (After decoding quoted-printable, etc.) The problem is actually that the Ruby ncurses gem is not wide-character aware, so dumping UTF8 to the terminal doesn't actually work. Well, it actually does seem to work for some characters, but not most of them. The solution has been known for quite some time, but it ain't pretty: http://rubyforge.org/pipermail/sup-talk/2007-October/000297.html The good news is that I've just made it slightly simpler, at least if you're running from git. I've published an "ncursesw" branch that contains a hacked ncurses-0.9.1 and a dirty script to install it into your ../lib/ directory. If you use that AND you run from git next, you'll see wide characters. It works! So, just a "few" "simple" commands: $ git branch --track ncursesw origin/ncursesw $ git checkout ncursesw $ cd ncurses-0.9.1/ $ ./run-this-for-sup.sh $ cd .. $ git checkout next $ ruby -Ilib bin/sup ... and you should see wide characters, assuming your terminal is capable. If make dies, you probably need to install some kind of ncursesw development library. On my Debian system it's a package called libncursesw5-dev. A gold star to anyone who makes a nice wiki page out of this. -- William From israel.herraiz at gmail.com Tue Apr 22 20:09:41 2008 From: israel.herraiz at gmail.com (Israel Herraiz) Date: Wed, 23 Apr 2008 02:09:41 +0200 Subject: [sup-talk] System encoding versus messages encoding In-Reply-To: <1208905597-sup-4977@south> References: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com> <1208905597-sup-4977@south> Message-ID: <1208908666-sup-5839@elly> Excerpts from William Morgan's message of Wed Apr 23 01:18:00 +0200 2008: > The good news is that I've just made it slightly simpler, at least if > you're running from git. I've published an "ncursesw" branch that > contains a hacked ncurses-0.9.1 and a dirty script to install it into > your ../lib/ directory. If you use that AND you run from git next, > you'll see wide characters. It works! Great. I have obtained the new changes from the git repository, and applied the recipe that you give, and yes, it works! Thanks! I am noting only another odd thing: when I press enter to from the inbox-mode to the thread-mode, some characters of the inbox view "persists" in the screen. I will file the bug if you consider that it is necessary. > A gold star to anyone who makes a nice wiki page out of this. I guess that is my turn :-). I will add a page about UTF-8 with a summary of this message and the message that you link. Thanks again for your help. Cheers, Israel From israel.herraiz at gmail.com Tue Apr 22 21:08:00 2008 From: israel.herraiz at gmail.com (Israel Herraiz) Date: Wed, 23 Apr 2008 03:08:00 +0200 Subject: [sup-talk] System encoding versus messages encoding In-Reply-To: <1208905597-sup-4977@south> References: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com> <1208905597-sup-4977@south> Message-ID: <1208912590-sup-562@elly> Excerpts from William Morgan's message of Wed Apr 23 01:18:00 +0200 2008: > A gold star to anyone who makes a nice wiki page out of this. I have added a summary of the content of the two messages (the parent message of this one, and the one you link with patches for the gem). It is available at: http://sup.rubyforge.org/wiki/wiki.pl?UTF8 I have added a link to this page in the main page of the wiki. Please note that I have tested only the method included in your previous message (using the git sources). I have not tested the other method (using the gem). I would appreaciate if someone can go to the wiki page, follow the recipe and check that is correct (or change whatever might be wrong). Cheers, Israel From wmorgan-sup at masanjin.net Tue Apr 22 21:43:04 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 22 Apr 2008 18:43:04 -0700 Subject: [sup-talk] [PATCH] Use read instead of readlines.join. In-Reply-To: <1208764973-sup-7179@ausone.inria.fr> References: <1207324856-7408-1-git-send-email-nicolas.pouillard@gmail.com> <1208764973-sup-7179@ausone.inria.fr> Message-ID: <1208914969-sup-7176@south> Reformatted excerpts from nicolas.pouillard's message of 2008-04-21: > What about this patch? Applied directly to master, and sorry for the delay. -- William From wmorgan-sup at masanjin.net Tue Apr 22 21:43:17 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 22 Apr 2008 18:43:17 -0700 Subject: [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup In-Reply-To: <1208764889-sup-5055@ausone.inria.fr> References: <12072321792626-git-send-email-nicolas.pouillard@gmail.com> <1208764889-sup-5055@ausone.inria.fr> Message-ID: <1208914991-sup-8445@south> Reformatted excerpts from nicolas.pouillard's message of 2008-04-21: > What about applying this patch? Applied directly to master, and sorry for the delay. -- William From wmorgan-sup at masanjin.net Tue Apr 22 21:44:26 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 22 Apr 2008 18:44:26 -0700 Subject: [sup-talk] [PATCH] Fix a bug about forwarding that trimmed out newlines. In-Reply-To: <1208764937-sup-2539@ausone.inria.fr> References: <1207325353-7638-1-git-send-email-nicolas.pouillard@gmail.com> <1208764937-sup-2539@ausone.inria.fr> Message-ID: <1208915002-sup-1755@south> Reformatted excerpts from nicolas.pouillard's message of 2008-04-21: > What about this patch? I merged a more minor version of the fix into next. -- William From wmorgan-sup at masanjin.net Tue Apr 22 21:53:18 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 22 Apr 2008 18:53:18 -0700 Subject: [sup-talk] System encoding versus messages encoding In-Reply-To: <1208912590-sup-562@elly> References: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com> <1208905597-sup-4977@south> <1208912590-sup-562@elly> Message-ID: <1208915530-sup-2047@south> Reformatted excerpts from Israel Herraiz's message of 2008-04-22: > http://sup.rubyforge.org/wiki/wiki.pl?UTF8 Thanks! Very thorough. > Please note that I have tested only the method included in your > previous message (using the git sources). I have not tested the other > method (using the gem). I would appreaciate if someone can go to the > wiki page, follow the recipe and check that is correct (or change > whatever might be wrong). I gave it a little tweak. -- William From wmorgan-sup at masanjin.net Tue Apr 22 22:03:07 2008 From: wmorgan-sup at masanjin.net (William Morgan) Date: Tue, 22 Apr 2008 19:03:07 -0700 Subject: [sup-talk] System encoding versus messages encoding In-Reply-To: <1208908666-sup-5839@elly> References: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com> <1208905597-sup-4977@south> <1208908666-sup-5839@elly> Message-ID: <1208916152-sup-4053@south> Reformatted excerpts from Israel Herraiz's message of 2008-04-22: > I am noting only another odd thing: when I press enter to from the > inbox-mode to the thread-mode, some characters of the inbox view > "persists" in the screen. Yeah, I see this too. Looks like a string length issue, actually. I'll look into it---probably an easy fix. -- William From nicolas.pouillard at gmail.com Wed Apr 23 04:59:24 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Wed, 23 Apr 2008 10:59:24 +0200 Subject: [sup-talk] [PATCH] Fix a bug about forwarding that trimmed out newlines. In-Reply-To: <1208915002-sup-1755@south> References: <1207325353-7638-1-git-send-email-nicolas.pouillard@gmail.com> <1208764937-sup-2539@ausone.inria.fr> <1208915002-sup-1755@south> Message-ID: <1208941031-sup-1885@port-ext16.ensta.fr> Excerpts from William Morgan's message of Wed Apr 23 03:44:26 +0200 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-04-21: > > What about this patch? > > I merged a more minor version of the fix into next. Great! However this hunk is useless: ==================================================================================== --- a/lib/sup/modes/edit-message-mode.rb +++ b/lib/sup/modes/edit-message-mode.rb @@ -122,7 +122,7 @@ EOS @file = Tempfile.new "sup.#{self.class.name.gsub(/.*::/, '').camel_to_hyphy}" @file.puts format_headers(@header - NON_EDITABLE_HEADERS).first @file.puts - @file.puts @body + @file.puts @body.join("\n") @file.close editor = $config[:editor] || ENV['EDITOR'] || "/usr/bin/vi" ==================================================================================== Since puts of an array have the same semantics, but cheaper. However it worth a comment to make it crystal clear. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080423/d3ac93fb/attachment.bin From nicolas.pouillard at gmail.com Wed Apr 23 04:59:46 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Wed, 23 Apr 2008 10:59:46 +0200 Subject: [sup-talk] [PATCH] Write sup-{exception-log, unable-to-decode}.txt in ~/.sup In-Reply-To: <1208914991-sup-8445@south> References: <12072321792626-git-send-email-nicolas.pouillard@gmail.com> <1208764889-sup-5055@ausone.inria.fr> <1208914991-sup-8445@south> Message-ID: <1208941173-sup-943@port-ext16.ensta.fr> Excerpts from William Morgan's message of Wed Apr 23 03:43:17 +0200 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-04-21: > > What about applying this patch? > > Applied directly to master, and sorry for the delay. No problem. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080423/3e0a19cf/attachment.bin From nicolas.pouillard at gmail.com Wed Apr 23 05:04:48 2008 From: nicolas.pouillard at gmail.com (Nicolas Pouillard) Date: Wed, 23 Apr 2008 11:04:48 +0200 Subject: [sup-talk] [PATCH] Fix a bug when forwarding and using crypto. In-Reply-To: <1207324905-7455-1-git-send-email-nicolas.pouillard@gmail.com> References: <1207324905-7455-1-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1208941472-sup-2742@port-ext16.ensta.fr> What about this patch? Excerpts from Nicolas Pouillard's message of Fri Apr 04 18:01:45 +0200 2008: > --- > lib/sup/modes/edit-message-mode.rb | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb > index 3aad623..dd96002 100644 > --- a/lib/sup/modes/edit-message-mode.rb > +++ b/lib/sup/modes/edit-message-mode.rb > @@ -324,7 +324,7 @@ protected > ## do whatever crypto transformation is necessary > if @crypto_selector && @crypto_selector.val != :none > from_email = PersonManager.person_for(@header["From"]).email > - to_email = (@header["To"] + @header["Cc"] + @header["Bcc"]).map { |p| PersonManager.person_for(p).email } > + to_email = [@header["To"], @header["Cc"], @header["Bcc"]].flatten.compact.map { |p| PersonManager.person_for(p).email } > > m = CryptoManager.send @crypto_selector.val, from_email, to_email, m > end -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 194 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080423/01052d0f/attachment.bin From christopher.witham at gmail.com Wed Apr 23 08:26:49 2008 From: christopher.witham at gmail.com (Chris) Date: Wed, 23 Apr 2008 08:26:49 -0400 Subject: [sup-talk] sup crashes on loading my index Message-ID: <20080423122649.GF22263@kyanos.dyndns.org> Hello all! First let me say how excited I am about sup -- I've been a mutt user for years, but since learning a bit about gmail I have been interested in the different paradigm of email management. I wrote a couple of scripts to emulate the 'star' feature in mutt (available if anyone wants them), but it doesn't change how the basis of interaction is still on folders. I can't really test sup just yet, though, because it crashes on or very shortly after loading. With 0.4, it crashed immediately after loading the indexes, with 0.5 it seems to have a few seconds of thread view before it does. I tried clearing the database by removing ~/.sup/ferret, but the problem came back. I've pasted the console output below, and attached the exception log (it looks like they contain much the same information). How can I determine what message is causing the problem? [Wed Apr 23 07:56:32 -0400 2008] using character set encoding "UTF-8" [Wed Apr 23 07:56:33 -0400 2008] locking /home/garou/.sup/lock... /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/crypto.rb:18: warning: Insecure world writable dir /usr /local/sbin in PATH, mode 040777 [Wed Apr 23 07:56:34 -0400 2008] crypto: detected gpg binary in /usr/bin/gpg [Wed Apr 23 07:56:34 -0400 2008] loading index... [Wed Apr 23 07:56:34 -0400 2008] loaded index of 10296 messages [Wed Apr 23 07:56:34 -0400 2008] starting curses /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/index.rb:237:in `sync_message': just added message "" but couldn't find it in a search (RuntimeError) from /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/util.rb:497:in `send' from /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/util.rb:497:in `method_missing' from /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:160:in `add_messages_from' from /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/maildir.rb:115:in `each' from /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/maildir.rb:112:in `upto' from /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/maildir.rb:112:in `each' from /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/util.rb:534:in `send' from /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/util.rb:534:in `__pass' ... 29 levels... from (eval):12:in `load_threads' from /usr/lib/ruby/gems/1.8/gems/sup-0.5/bin/sup:210 from /usr/bin/sup:19:in `load' from /usr/bin/sup:19 [Wed Apr 23 07:59:43 -0400 2008] stopped cursing [Wed Apr 23 07:59:43 -0400 2008] oh crap, an exception [Wed Apr 23 07:59:43 -0400 2008] unlocking /home/garou/.sup/lock... ---------------------------------------------------------------- I'm very sorry. It seems that an error occurred in Sup. Please accept my sincere apologies. If you don't mind, please send the contents of sup-exception-log.txt and a brief report of the circumstances to sup-talk at rubyforge dot orgs so that I might address this problem. Thank you! Sincerely, William ---------------------------------------------------------------- --- RuntimeError from thread: poll after loading inbox just added message "" but couldn't find it in a search /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/index.rb:237:in `sync_message' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/util.rb:497:in `send' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/util.rb:497:in `method_missing' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:160:in `add_messages_from' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/maildir.rb:115:in `each' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/maildir.rb:112:in `upto' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/maildir.rb:112:in `each' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/util.rb:534:in `send' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/util.rb:534:in `__pass' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/util.rb:523:in `method_missing' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:141:in `add_messages_from' /usr/lib/ruby/gems/1.8/g