From marcus-sup@bar-coded.net Tue Apr 1 06:07:06 2008 From: marcus-sup@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@masanjin.net Tue Apr 1 11:03:02 2008 From: wmorgan-sup@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@masanjin.net Tue Apr 1 11:04:55 2008 From: wmorgan-sup@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@masanjin.net Tue Apr 1 11:35:23 2008 From: wmorgan-sup@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@gurski.org Tue Apr 1 12:52:53 2008 From: sup-talk@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@masanjin.net Tue Apr 1 13:13:23 2008 From: wmorgan-sup@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@gurski.org Tue Apr 1 15:50:40 2008 From: sup-talk@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@rice.edu Tue Apr 1 16:03:08 2008 From: chrisw@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@antiflux.org Tue Apr 1 16:48:47 2008 From: grant@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@antiflux.org Tue Apr 1 17:49:36 2008 From: grant@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@masanjin.net Wed Apr 2 16:51:18 2008 From: wmorgan-sup@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@linkswarm.com Wed Apr 2 17:16:37 2008 From: vasudeva@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@masanjin.net Wed Apr 2 17:17:38 2008 From: wmorgan-sup@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@masanjin.net Wed Apr 2 21:12:40 2008 From: wmorgan-sup@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@masanjin.net Wed Apr 2 21:43:26 2008 From: wmorgan-sup@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@masanjin.net Wed Apr 2 21:49:43 2008 From: wmorgan-sup@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@masanjin.net Wed Apr 2 22:03:13 2008 From: wmorgan-sup@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@weisshuhn.de Thu Apr 3 10:07:11 2008 From: cjs@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@gmail.com Thu Apr 3 10:16:19 2008 From: nicolas.pouillard@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@antiflux.org Thu Apr 3 12:35:54 2008 From: grant@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@antiflux.org Thu Apr 3 12:40:36 2008 From: grant@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@roughage.com.au Thu Apr 3 16:59:56 2008 From: rgh@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@bar-coded.net Fri Apr 4 04:26:10 2008 From: marcus-sup@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@webpipe.net Fri Apr 4 02:56:28 2008 From: cameronm@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@gmail.com Fri Apr 4 08:14:06 2008 From: nicolas.pouillard@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@clarkparsia.com Fri Apr 4 09:13:44 2008 From: kendall@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@antiflux.org Fri Apr 4 09:47:37 2008 From: grant@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@antiflux.org Fri Apr 4 09:48:21 2008 From: grant@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@ubuntu.com Fri Apr 4 05:52:56 2008 From: damokles@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@gmail.com Fri Apr 4 12:00:56 2008 From: nicolas.pouillard@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@gmail.com Fri Apr 4 12:01:45 2008 From: nicolas.pouillard@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@masanjin.net Fri Apr 4 12:08:02 2008 From: wmorgan-sup@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@gmail.com Fri Apr 4 12:09:13 2008 From: nicolas.pouillard@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@gmail.com Fri Apr 4 12:10:11 2008 From: nicolas.pouillard@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@alum.vassar.edu Fri Apr 4 12:16:09 2008 From: marc.hartstein@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@clarkparsia.com Fri Apr 4 12:16:40 2008 From: kendall@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@clarkparsia.com Fri Apr 4 12:17:55 2008 From: kendall@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@masanjin.net Fri Apr 4 13:44:53 2008 From: wmorgan-sup@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@masanjin.net Fri Apr 4 13:47:31 2008 From: wmorgan-sup@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@masanjin.net Fri Apr 4 13:48:01 2008 From: wmorgan-sup@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@alum.vassar.edu Fri Apr 4 15:51:47 2008 From: marc.hartstein@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@alum.vassar.edu Fri Apr 4 17:43:44 2008 From: marc.hartstein@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@gmail.com Sat Apr 5 01:48:14 2008 From: its.jeff.balogh@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@gmail.com Sat Apr 5 05:26:19 2008 From: nicolas.pouillard@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@gmail.com Sat Apr 5 06:39:29 2008 From: nicolas.pouillard@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@masanjin.net Sat Apr 5 19:35:13 2008 From: wmorgan-sup@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@masanjin.net Sat Apr 5 20:04:34 2008 From: wmorgan-sup@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@masanjin.net Sat Apr 5 20:06:28 2008 From: wmorgan-sup@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@gmail.com Sun Apr 6 07:06:55 2008 From: patroclo7@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@antiflux.org Mon Apr 7 13:19:20 2008 From: grant@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@masanjin.net Mon Apr 7 14:00:18 2008 From: wmorgan-sup@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@roughage.com.au Wed Apr 9 06:07:36 2008 From: rgh@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@uark.edu Wed Apr 9 06:19:22 2008 From: itaylor@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@bar-coded.net Wed Apr 9 16:00:38 2008 From: marcus-sup@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@roughage.com.au Wed Apr 9 17:08:46 2008 From: rgh@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@masanjin.net Thu Apr 10 00:05:55 2008 From: wmorgan-sup@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@bar-coded.net Thu Apr 10 06:31:55 2008 From: marcus-sup@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@bar-coded.net Thu Apr 10 06:37:36 2008 From: marcus-sup@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@bar-coded.net Thu Apr 10 07:04:32 2008 From: marcus-sup@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@roughage.com.au Thu Apr 10 09:05:15 2008 From: rgh@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@roughage.com.au Thu Apr 10 09:09:04 2008 From: rgh@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@alum.vassar.edu Thu Apr 10 11:39:36 2008 From: marc.hartstein@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@rice.edu Thu Apr 10 16:41:35 2008 From: chrisw@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@masanjin.net Thu Apr 10 17:09:56 2008 From: wmorgan-sup@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@gmail.com Mon Apr 14 10:20:53 2008 From: fedzor@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@lanl.gov Mon Apr 14 10:45:47 2008 From: johnbent@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@gmail.com Mon Apr 14 10:46:57 2008 From: nicolas.pouillard@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@hinterland.nu Tue Apr 15 02:15:05 2008 From: chris@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@hinterland.nu Tue Apr 15 02:18:26 2008 From: chris@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@alum.vassar.edu Tue Apr 15 11:03:58 2008 From: marc.hartstein@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@masanjin.net Tue Apr 15 12:23:37 2008 From: wmorgan-sup@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@masanjin.net Tue Apr 15 12:26:43 2008 From: wmorgan-sup@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@byu.net Tue Apr 15 18:30:37 2008 From: miles@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@gmail.com Tue Apr 15 21:46:45 2008 From: its.jeff.balogh@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@masanjin.net Wed Apr 16 11:16:57 2008 From: wmorgan-sup@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@clarkparsia.com Wed Apr 16 11:30:20 2008 From: kendall@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@alum.vassar.edu Wed Apr 16 13:15:09 2008 From: marc.hartstein@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@rice.edu Wed Apr 16 15:02:10 2008 From: gcw5217@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@alum.vassar.edu Thu Apr 17 16:43:29 2008 From: marc.hartstein@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@alum.vassar.edu Thu Apr 17 16:58:29 2008 From: marc.hartstein@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@rice.edu Thu Apr 17 18:24:35 2008 From: chrisw@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@masanjin.net Sun Apr 20 18:26:23 2008 From: wmorgan-sup@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@gmail.com Mon Apr 21 04:01:45 2008 From: nicolas.pouillard@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@gmail.com Mon Apr 21 04:02:46 2008 From: nicolas.pouillard@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@gmail.com Mon Apr 21 04:02:59 2008 From: nicolas.pouillard@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@gmail.com Mon Apr 21 16:37:23 2008 From: israel.herraiz@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@hot.pl Tue Apr 22 07:39:59 2008 From: shot@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@masanjin.net Tue Apr 22 13:08:13 2008 From: wmorgan-sup@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@axiombox.com Tue Apr 22 14:27:25 2008 From: david@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@clarkparsia.com Tue Apr 22 14:36:13 2008 From: kendall@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@masanjin.net Tue Apr 22 14:37:44 2008 From: wmorgan-sup@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@axiombox.com Tue Apr 22 14:55:01 2008 From: david@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@roughage.com.au Tue Apr 22 18:48:12 2008 From: rgh@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@masanjin.net Tue Apr 22 19:18:00 2008 From: wmorgan-sup@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@gmail.com Tue Apr 22 20:09:41 2008 From: israel.herraiz@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@gmail.com Tue Apr 22 21:08:00 2008 From: israel.herraiz@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@masanjin.net Tue Apr 22 21:43:04 2008 From: wmorgan-sup@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@masanjin.net Tue Apr 22 21:43:17 2008 From: wmorgan-sup@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@masanjin.net Tue Apr 22 21:44:26 2008 From: wmorgan-sup@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@masanjin.net Tue Apr 22 21:53:18 2008 From: wmorgan-sup@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@masanjin.net Tue Apr 22 22:03:07 2008 From: wmorgan-sup@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@gmail.com Wed Apr 23 04:59:24 2008 From: nicolas.pouillard@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@gmail.com Wed Apr 23 04:59:46 2008 From: nicolas.pouillard@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@gmail.com Wed Apr 23 05:04:48 2008 From: nicolas.pouillard@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@gmail.com Wed Apr 23 08:26:49 2008 From: christopher.witham@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/gems/sup-0.5/lib/sup/poll.rb:98:in `do_poll' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:86:in `each' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:86:in `do_poll' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:85:in `synchronize' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:85:in `do_poll' /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/modes/poll-mode.rb:17:in `poll' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:53:in `poll' /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/bin/sup:210 /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:60:in `reporting_thread' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `initialize' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `new' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `reporting_thread' /usr/lib/ruby/gems/1.8/gems/sup-0.5/bin/sup:210 /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:536:in `call' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:536:in `__unprotected_load_threads' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:478:in `call' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:478:in `load_n_threads_background' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:60:in `reporting_thread' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `initialize' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `new' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `reporting_thread' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:476:in `load_n_threads_background' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:546:in `__unprotected_load_threads' (eval):12:in `load_threads' /usr/lib/ruby/gems/1.8/gems/sup-0.5/bin/sup:210 /usr/bin/sup:19:in `load' /usr/bin/sup:19 --- SystemExit from thread: main just added message "" but couldn't find it in a search /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:64:in `select' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/buffer.rb:31:in `nonblocking_getch' /usr/lib/ruby/gems/1.8/gems/sup-0.5/bin/sup:227 /usr/bin/sup:19:in `load' /usr/bin/sup:19 -- Chris Witham Computer Engineer and Geek Fan of video games, anime, and the outdoors All those who believe in telekinesis, raise my hand. - Kurt Vonnegut -------------- next part -------------- --- 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/gems/sup-0.5/lib/sup/poll.rb:98:in `do_poll' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:86:in `each' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:86:in `do_poll' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:85:in `synchronize' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:85:in `do_poll' /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/modes/poll-mode.rb:17:in `poll' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/poll.rb:53:in `poll' /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/bin/sup:210 /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:60:in `reporting_thread' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `initialize' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `new' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `reporting_thread' /usr/lib/ruby/gems/1.8/gems/sup-0.5/bin/sup:210 /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:536:in `call' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:536:in `__unprotected_load_threads' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:478:in `call' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:478:in `load_n_threads_background' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:60:in `reporting_thread' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `initialize' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `new' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:58:in `reporting_thread' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:476:in `load_n_threads_background' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/modes/thread-index-mode.rb:546:in `__unprotected_load_threads' (eval):12:in `load_threads' /usr/lib/ruby/gems/1.8/gems/sup-0.5/bin/sup:210 /usr/bin/sup:19:in `load' /usr/bin/sup:19 --- SystemExit from thread: main just added message "" but couldn't find it in a search /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup.rb:64:in `select' /usr/lib/ruby/gems/1.8/gems/sup-0.5/lib/sup/buffer.rb:31:in `nonblocking_getch' /usr/lib/ruby/gems/1.8/gems/sup-0.5/bin/sup:227 /usr/bin/sup:19:in `load' /usr/bin/sup:19 From marc.hartstein@alum.vassar.edu Wed Apr 23 17:02:50 2008 From: marc.hartstein@alum.vassar.edu (Marc Hartstein) Date: Wed, 23 Apr 2008 17:02:50 -0400 Subject: [sup-talk] [PATCH] Config control over how From address is generated when replying. Message-ID: <1208984570-24674-1-git-send-email-marc.hartstein@alum.vassar.edu> Two new boolean options are now recognized in .sup/config.yaml :reply_from_recipient: Check headers for the real email address the message ultimately arrived at, and use it if it's one of your accounts (or an alternate/regexp for such). :reply_from_tocc: Check To and CC for an address which matches one of your accounts and use the first such found. Both options default to true if missing, preserving the traditional sup behavior. Setting ...recipient to false and ...tocc to true will emulate mutt's behavior with reverse_name=true Setting both to false will always reply from your default account. --- lib/sup/modes/reply-mode.rb | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb index e7b2929..82ce912 100644 --- a/lib/sup/modes/reply-mode.rb +++ b/lib/sup/modes/reply-mode.rb @@ -29,10 +29,12 @@ EOS ## first, determine the address at which we received this email. this will ## become our From: address in the reply. + check_recipient = $config[:reply_from_recipient].nil? || $config[:reply_from_recipient] + check_tocc = $config[:reply_from_tocc].nil? || $config[:reply_from_tocc] from = - if @m.recipient_email && AccountManager.is_account_email?(@m.recipient_email) + if check_recipient && @m.recipient_email && AccountManager.is_account_email?(@m.recipient_email) PersonManager.person_for(@m.recipient_email) - elsif(b = (@m.to + @m.cc).find { |p| AccountManager.is_account? p }) + elsif check_tocc && (b = (@m.to + @m.cc).find { |p| AccountManager.is_account? p }) b else AccountManager.default_account -- 1.5.3.7 From israel.herraiz@gmail.com Wed Apr 23 17:23:58 2008 From: israel.herraiz@gmail.com (Israel Herraiz) Date: Wed, 23 Apr 2008 23:23:58 +0200 Subject: [sup-talk] [PATCH] Add list-id as a new property of messages Message-ID: <1208985725-sup-6028@elly> Hi there, I propose to add a "list_id" property to messages, just like list_subscribe, list_unsubscribe and list_address. I am using list_address.email to automatically generate labels for messages that are coming from mailing lists (that field uses the value of the List-Post header of the raw message). It seems that some mailing lists are not including that header though. In those lists where I do not see List-Post, I have found that List-Id is still present. Therefore I propose to add that header to the message class for filtering purposes. The change is minimal, and as far as I have found out, it does not affect any other part of Sup (like for instance the index of messages). I am attaching the patch below. Cheers, Israel --- lib/sup/mbox.rb | 1 + lib/sup/message.rb | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb index f267b3b..35d0283 100644 --- a/lib/sup/mbox.rb +++ b/lib/sup/mbox.rb @@ -32,6 +32,7 @@ module MBox /^(List-Post):\s*(.*?)\s*$/i, /^(List-Subscribe):\s*(.*?)\s*$/i, /^(List-Unsubscribe):\s*(.*?)\s*$/i, + /^(List-Id):\s*(.*?)\s*$/i, /^(Status):\s*(.*?)\s*$/i: header[last = $1] = $2 when /^(Message-Id):\s*(.*?)\s*$/i: header[mid_field = last = $1] = $2 diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 249b6c6..3952236 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -38,7 +38,7 @@ class Message attr_reader :id, :date, :from, :subj, :refs, :replytos, :to, :source, :cc, :bcc, :labels, :list_address, :recipient_email, :replyto, - :source_info, :list_subscribe, :list_unsubscribe + :source_info, :list_subscribe, :list_unsubscribe, :list_id bool_reader :dirty, :source_marked_read, :snippet_contains_encrypted_content @@ -128,6 +128,12 @@ class Message @source_marked_read = header["status"] == "RO" @list_subscribe = header["list-subscribe"] @list_unsubscribe = header["list-unsubscribe"] + @list_id = + if header["list-id"] + @list_id = PersonManager.person_for header["list-id"] + else + nil + end end private :parse_header -- 1.5.5 From marc.hartstein@alum.vassar.edu Wed Apr 23 20:43:12 2008 From: marc.hartstein@alum.vassar.edu (Marc Hartstein) Date: Wed, 23 Apr 2008 20:43:12 -0400 Subject: [sup-talk] [PATCH] Vi-style scroll keys Message-ID: <1208997793-14546-1-git-send-email-marc.hartstein@alum.vassar.edu> Adds ^f/^b ^d/^u ^e/^y keybindings to scroll-mode. --- lib/sup/modes/scroll-mode.rb | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/sup/modes/scroll-mode.rb b/lib/sup/modes/scroll-mode.rb index 922bf92..2d70fef 100644 --- a/lib/sup/modes/scroll-mode.rb +++ b/lib/sup/modes/scroll-mode.rb @@ -15,12 +15,14 @@ class ScrollMode < Mode COL_JUMP = 2 register_keymap do |k| - k.add :line_down, "Down one line", :down, 'j', 'J' - k.add :line_up, "Up one line", :up, 'k', 'K' + k.add :line_down, "Down one line", :down, 'j', 'J', "\C-e" + k.add :line_up, "Up one line", :up, 'k', 'K', "\C-y" k.add :col_left, "Left one column", :left, 'h' k.add :col_right, "Right one column", :right, 'l' - k.add :page_down, "Down one page", :page_down, ' ' - k.add :page_up, "Up one page", :page_up, 'p', :backspace + k.add :page_down, "Down one page", :page_down, ' ', "\C-f" + k.add :page_up, "Up one page", :page_up, 'p', :backspace, "\C-b" + k.add :half_page_down, "Down one half page", "\C-d" + k.add :half_page_up, "Up one half page", "\C-u" k.add :jump_to_start, "Jump to top", :home, '^', '1' k.add :jump_to_end, "Jump to bottom", :end, '$', '0' k.add :jump_to_left, "Jump to the left", '[' @@ -130,6 +132,8 @@ class ScrollMode < Mode def line_up; jump_to_line @topline - 1; end def page_down; jump_to_line @topline + buffer.content_height - @slip_rows; end def page_up; jump_to_line @topline - buffer.content_height + @slip_rows; end + def half_page_down; jump_to_line @topline + buffer.content_height / 2; end + def half_page_up; jump_to_line @topline - buffer.content_height / 2; end def jump_to_start; jump_to_line 0; end def jump_to_end; jump_to_line lines - buffer.content_height; end -- 1.5.3.7 From marc.hartstein@alum.vassar.edu Wed Apr 23 20:43:13 2008 From: marc.hartstein@alum.vassar.edu (Marc Hartstein) Date: Wed, 23 Apr 2008 20:43:13 -0400 Subject: [sup-talk] [PATCH] Fixes alignment when printing help screen if \C-x is bound. In-Reply-To: <1208997793-14546-1-git-send-email-marc.hartstein@alum.vassar.edu> References: <1208997793-14546-1-git-send-email-marc.hartstein@alum.vassar.edu> Message-ID: <1208997793-14546-2-git-send-email-marc.hartstein@alum.vassar.edu> Width calculations were getting off by one, causing truncated definitions. --- lib/sup/keymap.rb | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) diff --git a/lib/sup/keymap.rb b/lib/sup/keymap.rb index 3176415..080e11d 100644 --- a/lib/sup/keymap.rb +++ b/lib/sup/keymap.rb @@ -43,16 +43,10 @@ class Keymap when :home: "" when :end: "" when :enter, :return: "" - when :ctrl_l: "ctrl-l" - when :ctrl_g: "ctrl-g" when :tab: "tab" when " ": "" else - if k.is_a?(String) && k.length == 1 - k - else - raise ArgumentError, "unknown key name \"#{k}\"" - end + Curses::keyname(keysym_to_keycode k) end end -- 1.5.3.7 From its.jeff.balogh@gmail.com Thu Apr 24 01:23:10 2008 From: its.jeff.balogh@gmail.com (Jeff Balogh) Date: Thu, 24 Apr 2008 01:23:10 -0400 Subject: [sup-talk] [PATCH] add a reply-to hook, for setting the Reply To field. In-Reply-To: <1207373363-sup-374@archie> References: <1207373363-sup-374@archie> Message-ID: <1209014328-sup-5801@archie> I prefer to reply to a mailing list, then all participants: $ cat .sup/hooks/reply-to.rb ([:list, :all] & types)[0] --- I've been happily using this locally, and forgot to send it to the list. :P lib/sup/modes/reply-mode.rb | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb index e7b2929..ad50fed 100644 --- a/lib/sup/modes/reply-mode.rb +++ b/lib/sup/modes/reply-mode.rb @@ -19,6 +19,14 @@ Return value: A string containing the text of the quote line (can be multi-line) EOS + HookManager.register "reply-to", < types + Redwood::log hook_reply.to_s + @type_selector.set_to( - if @m.is_list_message? + if types.include? hook_reply + hook_reply + elsif @m.is_list_message? :list elsif @headers.member? :sender :sender -- 1.5.5.1 From marc.hartstein@alum.vassar.edu Thu Apr 24 01:56:00 2008 From: marc.hartstein@alum.vassar.edu (Marc Hartstein) Date: Thu, 24 Apr 2008 01:56:00 -0400 Subject: [sup-talk] [PATCH] add a reply-to hook, for setting the Reply To field. In-Reply-To: <1209014328-sup-5801@archie> References: <1207373363-sup-374@archie> <1209014328-sup-5801@archie> Message-ID: <1209016094-sup-288@cabinet> Excerpts from its.jeff.balogh's message of Thu Apr 24 01:23:10 -0400 2008: > I prefer to reply to a mailing list, then all participants: > > $ cat .sup/hooks/reply-to.rb > ([:list, :all] & types)[0] Neat. For reference for anybody interested in using this, possible values are in lib/sup/modes/reply-mode.rb:5 :sender => "Sender", :recipient => "Recipient", :all => "All", :list => "Mailing list", :user => "Customized" The default behavior should be equivalent [see line 97] to ([:list, :sender, :recipient] & types)[0] Is there a reason you ended up going with a hook? I wonder if the hook should be provided with the current message for fuller processing. -------------- 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/20080424/1ab3f2e6/attachment.bin From marcus-sup@bar-coded.net Thu Apr 24 04:54:53 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Thu, 24 Apr 2008 09:54:53 +0100 Subject: [sup-talk] [PATCH] Add list-id as a new property of messages In-Reply-To: <1208985725-sup-6028@elly> References: <1208985725-sup-6028@elly> Message-ID: <1209026545-sup-9368@tomsk> On 23.4.2008, Israel Herraiz wrote: > I am using list_address.email to automatically generate labels for > messages that are coming from mailing lists (that field uses the value > of the List-Post header of the raw message). It seems that some > mailing lists are not including that header though. In those lists > where I do not see List-Post, I have found that List-Id is still > present. Therefore I propose to add that header to the message class > for filtering purposes. Adding list-id is a good idea I think but you cant do a personmanager lookup with it because it isnt really an email address according to the RFC [1]. List-Subscribe and List-Unsubscribe all set their counterparts in message.rb to the raw header so this is what I would expect list_id to get set to. [snip] > @@ -128,6 +128,12 @@ class Message > @source_marked_read = header["status"] == "RO" > @list_subscribe = header["list-subscribe"] > @list_unsubscribe = header["list-unsubscribe"] > + @list_id = > + if header["list-id"] > + @list_id = PersonManager.person_for header["list-id"] > + else > + nil > + end > end > private :parse_header [snip] If you are labeling via list-id you just want the raw header so this should just be @list_id = header["list-id"] Then if you want to do a lookup you can do it in the before-add-message hook. Marcus [1] http://www.apps.ietf.org/rfc/rfc2919.html From its.jeff.balogh@gmail.com Thu Apr 24 10:38:28 2008 From: its.jeff.balogh@gmail.com (Jeff Balogh) Date: Thu, 24 Apr 2008 10:38:28 -0400 Subject: [sup-talk] [PATCH] add a reply-to hook, for setting the Reply To field. In-Reply-To: <1209016094-sup-288@cabinet> References: <1207373363-sup-374@archie> <1209014328-sup-5801@archie> <1209016094-sup-288@cabinet> Message-ID: <1209047347-sup-6866@archie> marc.hartstein wrote: > Excerpts from its.jeff.balogh's message of Thu Apr 24 01:23:10 -0400 2008: > > I prefer to reply to a mailing list, then all participants: > > > > $ cat .sup/hooks/reply-to.rb > > ([:list, :all] & types)[0] > > Neat. For reference for anybody interested in using this, possible > values are in lib/sup/modes/reply-mode.rb:5 > > :sender => "Sender", > :recipient => "Recipient", > :all => "All", > :list => "Mailing list", > :user => "Customized" > > The default behavior should be equivalent [see line 97] to > ([:list, :sender, :recipient] & types)[0] Thanks. Your documentation skills far exceed mine. :) > Is there a reason you ended up going with a hook? 1. Laziness. 2. Reluctance to add to config. 3. Because I expected someone might want to be fancier, maybe getting the message for fuller processing. > I wonder if the hook should be provided with the current message for > fuller processing. If you (or anyone) finds that useful, we can add it. I left it out to keep the hook simple. From marc.hartstein@alum.vassar.edu Thu Apr 24 15:36:52 2008 From: marc.hartstein@alum.vassar.edu (Marc Hartstein) Date: Thu, 24 Apr 2008 15:36:52 -0400 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: <1209065804-sup-3481@cabinet> Excerpts from Israel Herraiz's message of Tue Apr 22 21:08:00 -0400 2008: > 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. > > http://sup.rubyforge.org/wiki/wiki.pl?UTF8 > > 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). Have just followed the Git instructions on the wiki, and some of my wide character weirdness has gone away. Thanks, both of you. -------------- 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/20080424/fd4328b5/attachment.bin From grant@antiflux.org Thu Apr 24 19:10:24 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Thu, 24 Apr 2008 19:10:24 -0400 Subject: [sup-talk] [PATCH] fixed dlopen of libc for os x In-Reply-To: <1208905597-sup-4977@south> References: <691d00b80804211337h32fe47b0l7c5ab0b331ae71af@mail.gmail.com> <1208905597-sup-4977@south> Message-ID: <1209078492-sup-5794@spooky.local> OS X likes to do its own thing. --- lib/sup.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup.rb b/lib/sup.rb index c4d1dd5..afd030f 100644 --- a/lib/sup.rb +++ b/lib/sup.rb @@ -14,7 +14,7 @@ require 'curses' require 'dl/import' module LibC extend DL::Importable - dlload "libc.so.6" + dlload Config::CONFIG['arch'] =~ /darwin/ ? "libc.dylib" : "libc.so.6" extern "void setlocale(int, const char *)" end LibC.setlocale(6, "") # LC_ALL == 6 -- 1.5.4.4 From dag.odenhall@gmail.com Thu Apr 24 19:53:51 2008 From: dag.odenhall@gmail.com (Dag Odenhall) Date: Fri, 25 Apr 2008 01:53:51 +0200 Subject: [sup-talk] [PATCH] Configurable coloring Message-ID: <1209080103-sup-8620@psilocybic> Hello good folks This lil patch allows you to override these color symbols: :status :index_old :index_new :index_starred :index_draft :labellist_old :labellist_new :twiddle :label :message_patina :alternate_patina :missing_message :attachment :cryptosig_valid :cryptosig_unknown :cryptosig_invalid :generic_notice_patina :quote_patina :sig_patina :quote :sig :to_me :starred :starred_patina :alternate_starred_patina :snippet :option :tagged :draft_notification :completion_character :horizontal_selector_selected :horizontal_selector_unselected :search_highlight in your config.yaml. You can set :fg or :bg to any of: default (transparent) black blue cyan green magenta red white yellow You can also set :attrs to a list of any of: horizontal reverse left blink low dim right bold top protect attributes vertical invis normal color altcharset standout chartext underline This all goes under :colors, so an example would be: :colors: :status: :fg: black :bg: red :attrs: - reverse - underline This is all a quick hack that can probably be improved upon, but it works fine. Thanks Marc Hartstein for help with getting the transparency working. Dag. diff --git a/bin/sup b/bin/sup index 078a134..0c5e70d 100644 --- a/bin/sup +++ b/bin/sup @@ -78,6 +78,7 @@ def start_cursing Ncurses.stdscr.keypad 1 Ncurses.curs_set 0 Ncurses.start_color + Ncurses.use_default_colors $cursing = true end diff --git a/lib/sup/colormap.rb b/lib/sup/colormap.rb index 9c6869a..4c48604 100644 --- a/lib/sup/colormap.rb +++ b/lib/sup/colormap.rb @@ -1,3 +1,7 @@ +module Curses + COLOR_DEFAULT = -1 +end + module Redwood class Colormap @@ -6,7 +10,7 @@ class Colormap CURSES_COLORS = [Curses::COLOR_BLACK, Curses::COLOR_RED, Curses::COLOR_GREEN, Curses::COLOR_YELLOW, Curses::COLOR_BLUE, Curses::COLOR_MAGENTA, Curses::COLOR_CYAN, - Curses::COLOR_WHITE] + Curses::COLOR_WHITE, Curses::COLOR_DEFAULT] NUM_COLORS = 15 def initialize @@ -80,6 +84,11 @@ class Colormap fg, bg, attrs, color = @entries[sym] return color if color + confcolor = $config[:colors][sym.to_s[0..-7].to_sym] rescue nil + fg = Curses.const_get "COLOR_#{confcolor[:fg].upcase}" rescue fg + bg = Curses.const_get "COLOR_#{confcolor[:bg].upcase}" rescue bg + attrs = confcolor[:attrs].map {|a| Curses.const_get "A_#{a.upcase}" } rescue attrs + if(cp = @color_pairs[[fg, bg]]) ## nothing else ## need to get a new colorpair From dag.odenhall@gmail.com Fri Apr 25 15:12:16 2008 From: dag.odenhall@gmail.com (Dag Odenhall) Date: Fri, 25 Apr 2008 21:12:16 +0200 Subject: [sup-talk] [PATCH] use any custom colors configured in config.yaml Message-ID: <1209150616-sup-8211@psilocybic> * bin/sup: (start_cursing) Initialize use of default colors (transparency). * lib/sup/colormap.rb: Add a COLOR_DEFAULT constant to the Curses module. (CURSES_COLOR) Add the new COLOR_DEFAULT constant. (color_for) Use colors from config if available. Signed-off-by: Dag Odenhall --- bin/sup | 1 + lib/sup/colormap.rb | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/bin/sup b/bin/sup index 6360cde..e791fe5 100644 --- a/bin/sup +++ b/bin/sup @@ -78,6 +78,7 @@ def start_cursing Ncurses.stdscr.keypad 1 Ncurses.curs_set 0 Ncurses.start_color + Ncurses.use_default_colors $cursing = true end diff --git a/lib/sup/colormap.rb b/lib/sup/colormap.rb index 9c6869a..4c48604 100644 --- a/lib/sup/colormap.rb +++ b/lib/sup/colormap.rb @@ -1,3 +1,7 @@ +module Curses + COLOR_DEFAULT = -1 +end + module Redwood class Colormap @@ -6,7 +10,7 @@ class Colormap CURSES_COLORS = [Curses::COLOR_BLACK, Curses::COLOR_RED, Curses::COLOR_GREEN, Curses::COLOR_YELLOW, Curses::COLOR_BLUE, Curses::COLOR_MAGENTA, Curses::COLOR_CYAN, - Curses::COLOR_WHITE] + Curses::COLOR_WHITE, Curses::COLOR_DEFAULT] NUM_COLORS = 15 def initialize @@ -80,6 +84,11 @@ class Colormap fg, bg, attrs, color = @entries[sym] return color if color + confcolor = $config[:colors][sym.to_s[0..-7].to_sym] rescue nil + fg = Curses.const_get "COLOR_#{confcolor[:fg].upcase}" rescue fg + bg = Curses.const_get "COLOR_#{confcolor[:bg].upcase}" rescue bg + attrs = confcolor[:attrs].map {|a| Curses.const_get "A_#{a.upcase}" } rescue attrs + if(cp = @color_pairs[[fg, bg]]) ## nothing else ## need to get a new colorpair -- 1.5.5.1 From israel.herraiz@gmail.com Fri Apr 25 16:46:04 2008 From: israel.herraiz@gmail.com (Israel Herraiz) Date: Fri, 25 Apr 2008 22:46:04 +0200 Subject: [sup-talk] [PATCH] Add list-id as a new property of messages In-Reply-To: <1209026545-sup-9368@tomsk> References: <1208985725-sup-6028@elly> <1209026545-sup-9368@tomsk> Message-ID: <1209156188-sup-868@elly> Excerpts from Marcus Williams's message of Thu Apr 24 10:54:53 +0200 2008: > Adding list-id is a good idea I think but you cant do a personmanager > lookup with it because it isnt really an email address according to > the RFC [1]. List-Subscribe and List-Unsubscribe all set their > counterparts in message.rb to the raw header so this is what I would > expect list_id to get set to. Yes, I know. The "problem" is that List-Id use to have two fields: one that is a name, and another one that is a address-like. I wanted to use that last field and no the name for the automatic label. That's why I have used PersonManager to process the List-Id header. I know it is not a "dirty hack", but after all the regular expression to obtain that part of List-Id is the same that to obtain the address of List-Post. So I thought it was not that bad to use PersonManager to apply the same regular expression. Cheers, Israel From marcus-sup@bar-coded.net Fri Apr 25 17:15:38 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Fri, 25 Apr 2008 22:15:38 +0100 Subject: [sup-talk] [PATCH] Add list-id as a new property of messages In-Reply-To: <1209156188-sup-868@elly> References: <1208985725-sup-6028@elly> <1209026545-sup-9368@tomsk> <1209156188-sup-868@elly> Message-ID: <1209157604-sup-2682@tomsk> On 25.4.2008, Israel Herraiz wrote: > Yes, I know. The "problem" is that List-Id use to have two fields: one > that is a name, and another one that is a address-like. I wanted to > use that last field and no the name for the automatic label. That's > why I have used PersonManager to process the List-Id header. :) I'm not saying you shouldnt do it - just that personally I dont think you should do it in the place you do it. If you make list-id the raw header in your patch then you can do the person manager lookup in your before-add-message labeling hook (assuming thats where you're labeling stuff). That way someone that wants to do something different with the list-id header can do because you've given them the raw header contents. Having said all that, you can access the raw headers directly from the message object in the hook anyway so maybe this is a non-issue. I'll shut up :) Marcus From wmorgan-sup@masanjin.net Sun Apr 27 02:45:44 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 26 Apr 2008 23:45:44 -0700 Subject: [sup-talk] CONTRIBUTORS Message-ID: <1209278709-sup-4240@south> There's now a CONTRIBUTORS file and a section of the webpage where you can see your name in lights. Order is determined by git-rank-contributors (i.e. total size of diffs in the branch history). Finally, the fame you all deserve. -- William From wmorgan-sup@masanjin.net Sun Apr 27 02:47:36 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 26 Apr 2008 23:47:36 -0700 Subject: [sup-talk] [PATCH] Fix a bug when forwarding and using crypto. Message-ID: <1209278844-sup-1603@south> Reformatted excerpts from nicolas.pouillard's message of 2008-04-23: > What about this patch? Applied directly to master. Thanks! -- William From wmorgan-sup@masanjin.net Sun Apr 27 02:48:07 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 26 Apr 2008 23:48:07 -0700 Subject: [sup-talk] sup crashes on loading my index Message-ID: <1209278883-sup-9468@south> Reformatted excerpts from William Morgan's message of 2008-04-25: > Until I fix that I've merged a bugfix into next, if you care to try it. -- William From wmorgan-sup@masanjin.net Sun Apr 27 02:48:36 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 26 Apr 2008 23:48:36 -0700 Subject: [sup-talk] [PATCH] fixed dlopen of libc for os x Message-ID: <1209278908-sup-4247@south> Reformatted excerpts from Grant Hollingworth's message of 2008-04-24: > OS X likes to do its own thing. Merged into next. Thanks! -- William From wmorgan-sup@masanjin.net Sun Apr 27 02:49:25 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 26 Apr 2008 23:49:25 -0700 Subject: [sup-talk] [PATCH] Config control over how From address is generated when replying. Message-ID: <1209278945-sup-1601@south> Hi Marc, Reformatted excerpts from Marc Hartstein's message of 2008-04-23: > Two new boolean options are now recognized in .sup/config.yaml I appreciate the idea behind this patch, but I'm making a concerted effort to keep the config options down to a minimum. I'd prefer a hook that passed in all the relevant header values as parameters (@m.recipient_email, @m.to, @m.cc, etc) and returned the desired From: address. Then people can implement their own logic without the config file starting down the path of Mutt-style configuration insanity. You could actually technically accomplish this already with the before-edit hook, but I'd be happy with a special purpose hook. -- William From wmorgan-sup@masanjin.net Sun Apr 27 02:50:16 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 26 Apr 2008 23:50:16 -0700 Subject: [sup-talk] [PATCH] Add 'A' archive and mark read command to inbox-mode. Message-ID: <1209279010-sup-8083@south> Reformatted excerpts from Marc Hartstein's message of 2008-04-17: > 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. Very nice idea. Merged into next. Thanks! -- William From wmorgan-sup@masanjin.net Sun Apr 27 02:50:05 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 26 Apr 2008 23:50:05 -0700 Subject: [sup-talk] [PATCH] add a reply-to hook, for setting the Reply To field. Message-ID: <1209278999-sup-9027@south> Reformatted excerpts from William Morgan's message of 2008-04-26: > Maybe add the list of allowable return values. Heck, you could generate this automatically. Self-documenting code, literally! -- William From wmorgan-sup@masanjin.net Sun Apr 27 02:49:55 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 26 Apr 2008 23:49:55 -0700 Subject: [sup-talk] [PATCH] add a reply-to hook, for setting the Reply To field. Message-ID: <1209278987-sup-1806@south> Reformatted excerpts from its.jeff.balogh's message of 2008-04-23: > $ cat .sup/hooks/reply-to.rb > ([:list, :all] & types)[0] I'd be happy to put this in, but agree that it needs slightly better documntation. Maybe add the list of allowable return values. And saying it sets the "Reply To field" isn't quite accurate--more like it sets the default reply-to "mode". Minor nitpicks, but I can see someone being confused by the output of sup --list-hooks. -- William From wmorgan-sup@masanjin.net Sun Apr 27 02:49:39 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 26 Apr 2008 23:49:39 -0700 Subject: [sup-talk] [PATCH] Fixes alignment when printing help screen if \C-x is bound. Message-ID: <1209278973-sup-3345@south> Both patched merged into next. Thanks! -- William From chrisw@rice.edu Sun Apr 27 04:45:59 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Sun, 27 Apr 2008 03:45:59 -0500 Subject: [sup-talk] [PATCH] fixed dlopen of libc for os x In-Reply-To: <1209278908-sup-4247@south> References: <1209278908-sup-4247@south> Message-ID: <1209285778-sup-2320@chris-tablet> Excerpts from William Morgan's message of Sun Apr 27 01:48:36 -0500 2008: >> OS X likes to do its own thing. > Merged into next. Thanks! Cygwin does too. You need to load "cygwin1.dll", not "libc.so.6". For now, I've hacked this into my repository. However, we really should come up with a cleaner way of handing these architecture-dependent idiosyncrasies. (The Factory pattern from OO design comes to mind...) -- christopher Warrington From nicolas.pouillard@gmail.com Sun Apr 27 05:48:10 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Sun, 27 Apr 2008 11:48:10 +0200 Subject: [sup-talk] CONTRIBUTORS In-Reply-To: <1209278709-sup-4240@south> References: <1209278709-sup-4240@south> Message-ID: <1209289677-sup-6279@ausone.local> Excerpts from William Morgan's message of Sun Apr 27 08:45:44 +0200 2008: > There's now a CONTRIBUTORS file and a section of the webpage where you > can see your name in lights. Order is determined by > git-rank-contributors (i.e. total size of diffs in the branch history). > Finally, the fame you all deserve. Thank you William! -- 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: From marc.hartstein@alum.vassar.edu Mon Apr 28 00:11:06 2008 From: marc.hartstein@alum.vassar.edu (Marc Hartstein) Date: Mon, 28 Apr 2008 00:11:06 -0400 Subject: [sup-talk] [PATCH] Config control over how From address is generated when replying. In-Reply-To: <1209278945-sup-1601@south> References: <1209278945-sup-1601@south> Message-ID: <1209354047-sup-9578@cabinet> Excerpts from William Morgan's message of Sun Apr 27 02:49:25 -0400 2008: > I appreciate the idea behind this patch, but I'm making a concerted > effort to keep the config options down to a minimum. I'd prefer a hook > that passed in all the relevant header values as parameters > (@m.recipient_email, @m.to, @m.cc, etc) and returned the desired From: > address. Then people can implement their own logic without the config > file starting down the path of Mutt-style configuration insanity. I can appreciate the desire not to have so many configuration settings that you have to read through a tome to find the one you want (and might simply never know that the one you want exists). Is there a reason not to simply pass in the message object to the hook, as is done for attribution? > You could actually technically accomplish this already with the > before-edit hook, but I'd be happy with a special purpose hook. I didn't see any straightforward way to do it using before-edit, as before-edit is only passed the header hash and the body. Unless the References/In-Reply-To headers contain enough information to pull up the message being replied to, the information I'm using isn't available. I have two thoughts on how to do this right now, on which I'd appreciate input. First, a new hook "before-edit-reply", like before-edit but with a third parameter which is the message to which the user is replying. Should probably be called in addition to before-edit so users don't have to repeat themselves between the two (or explicitly make their before-edit-reply call into their before-edit). The second idea is to modify before-edit to provide the message object for the message being replied to or forwarded, if any, and some indication of whether this is a brand-new message, a reply, a forward, or a bounce. User can then put all the logic in here, which I think makes sense. However, it changes an existing API, and I don't know if it can be done in a way which doesn't break current before-edit hooks. I think I slightly prefer the change to before-edit approach, mostly because it allows for the forward and bounce cases if somebody wants to do some special handling there. I'd definitely like some feedback, though, as I'm not quite happy with either idea. Thanks for getting back to me, Marc P.S. William, I noticed your recent round of posts to the list lacked In-Reply-To and References headers, so they didn't thread with the posts they were replying to. Want to make sure you're aware of it. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 235 bytes Desc: not available URL: From grant@antiflux.org Mon Apr 28 11:26:16 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Mon, 28 Apr 2008 11:26:16 -0400 Subject: [sup-talk] [PATCH] parenthesized argument to quell warning Message-ID: <1209396227-sup-5273@spooky.local> --- lib/sup/keymap.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup/keymap.rb b/lib/sup/keymap.rb index 080e11d..76c7139 100644 --- a/lib/sup/keymap.rb +++ b/lib/sup/keymap.rb @@ -46,7 +46,7 @@ class Keymap when :tab: "tab" when " ": "" else - Curses::keyname(keysym_to_keycode k) + Curses::keyname(keysym_to_keycode(k)) end end -- 1.5.4.4 From pomeroymiles@gmail.com Mon Apr 28 12:25:57 2008 From: pomeroymiles@gmail.com (Miles Pomeroy) Date: Mon, 28 Apr 2008 09:25:57 -0700 Subject: [sup-talk] Gmail IMAP with sup In-Reply-To: <1208309556-sup-3399@archie> References: <6038aa2a0804151530uae50bbbxc6b8eed49906fcf8@mail.gmail.com> <1208309556-sup-3399@archie> Message-ID: >> 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. If this is part of sup philosophy then I'm assuming that it's not going to change. Can someone explain to me why this is a good thing? I use multiple computers and would like to use multiple clients to check my email, but this philosophy seems to only allow for one computer, one client. From wmorgan-sup@masanjin.net Mon Apr 28 18:28:29 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 28 Apr 2008 15:28:29 -0700 Subject: [sup-talk] [PATCH] use any custom colors configured in config.yaml In-Reply-To: <1209150616-sup-8211@psilocybic> References: <1209150616-sup-8211@psilocybic> Message-ID: <1209421539-sup-5981@south> Hi Dag, Thanks for the patch! People have been clamoring for this functionality forever and I have been cruelly not doing it for them. A few minor comments: Reformatted excerpts from Dag Odenhall's message of 2008-04-25: > + confcolor = $config[:colors][sym.to_s[0..-7].to_sym] rescue nil > + fg = Curses.const_get "COLOR_#{confcolor[:fg].upcase}" rescue fg > + bg = Curses.const_get "COLOR_#{confcolor[:bg].upcase}" rescue bg > + attrs = confcolor[:attrs].map {|a| Curses.const_get "A_#{a.upcase}" } rescue attrs 1. Can you wrap all this in an if statement, rather than having sequence of post-fix rescue stuff? You could do something like "if(confcolor = $config[...)" and set fg and bg within that. 2. Errors in the color names will be silently ignored. The NameError exception should be caught and turned into a BufferManager.flash and a Redwood::log to inform the user. 3. Since I feel like people will write a lot of these descriptions, I would load in colors from a colors.yaml file instead of from the config file. (I can do this one instead if you're unsure.) -- William From dag.odenhall@gmail.com Mon Apr 28 19:01:41 2008 From: dag.odenhall@gmail.com (Dag Odenhall) Date: Tue, 29 Apr 2008 01:01:41 +0200 Subject: [sup-talk] [PATCH] use any custom colors configured in config.yaml In-Reply-To: <1209421539-sup-5981@south> References: <1209150616-sup-8211@psilocybic> <1209421539-sup-5981@south> Message-ID: <1209422677-sup-2455@psilocybic> Excerpts from William Morgan's message of Tue Apr 29 00:28:29 +0200 2008: > Hi Dag, > > Thanks for the patch! People have been clamoring for this functionality > forever and I have been cruelly not doing it for them. Well thanks for the thanks! :) > > A few minor comments: > > Reformatted excerpts from Dag Odenhall's message of 2008-04-25: > > + confcolor = $config[:colors][sym.to_s[0..-7].to_sym] rescue nil > > + fg = Curses.const_get "COLOR_#{confcolor[:fg].upcase}" rescue fg > > + bg = Curses.const_get "COLOR_#{confcolor[:bg].upcase}" rescue bg > > + attrs = confcolor[:attrs].map {|a| Curses.const_get "A_#{a.upcase}" } rescue attrs > > 1. Can you wrap all this in an if statement, rather than having sequence of > post-fix rescue stuff? You could do something like "if(confcolor > = $config[...)" and set fg and bg within that. > > 2. Errors in the color names will be silently ignored. The > NameError exception should be caught and turned into a > BufferManager.flash and a Redwood::log to inform the user. I'll give it a try. > 3. Since I feel like people will write a lot of these descriptions, I > would load in colors from a colors.yaml file instead of from the > config file. (I can do this one instead if you're unsure.) I could give this a try too, then again you are probably better at getting it the way you envision it... I guess we'll see. :) From bdwalton@gmail.com Tue Apr 29 09:47:48 2008 From: bdwalton@gmail.com (Ben Walton) Date: Tue, 29 Apr 2008 09:47:48 -0400 Subject: [sup-talk] [PATCH] flexible sent source Message-ID: Hi All, I spoke briefly with William yesterday about this, but didn't get a chance to package it until just now... I've recently discovered sup and am looking to try it out to see if it will work for my needs (or can be made to). It seems to combine the things I love about mutt and gmail into a great package (and ruby is a plus too!). Right off the bat, I wanted support for maildir or imap storage of sent mail (I live in nfs land so I tend to have a natural distaste for mbox). I've implemented the basic functionality for this although there is more room to work (the mbox version is implemented in SentLoader as I didn't want to get into refactoring mbox code yet). Also, this is my first exposure to working with git, so I apologize if the attached patch isn't up to snuff...Comments welcome, and I'll certainly update the patch and resubmit. I hope you'll find this useful...It's working for me currently, but there are likely some things that could be improved. Thanks -Ben -- --------------------------------------------------------------------------------------------------------------------------- Ben Walton When one person suffers from a delusion, it is called insanity. When many people suffer from a delusion it is called Religion. Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance --------------------------------------------------------------------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-flexible-sent-source.patch Type: text/x-patch Size: 10392 bytes Desc: not available URL: From wmorgan-sup@masanjin.net Tue Apr 29 12:19:39 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 29 Apr 2008 09:19:39 -0700 Subject: [sup-talk] [PATCH] Config control over how From address is generated when replying. In-Reply-To: <1209354047-sup-9578@cabinet> References: <1209278945-sup-1601@south> <1209354047-sup-9578@cabinet> Message-ID: <1209484583-sup-8823@south> Reformatted excerpts from Marc Hartstein's message of 2008-04-27: > I can appreciate the desire not to have so many configuration settings > that you have to read through a tome to find the one you want (and > might simply never know that the one you want exists). There's that, and there's the fact that people want all sorts of crazy things to happen with their email and I'd rather provide them a programming language to describe their ideas than have to implement a configuration option for each one. > I didn't see any straightforward way to do it using before-edit, as > before-edit is only passed the header hash and the body. You're right. I was thinking before-edit passed in the message object. > I think I slightly prefer the change to before-edit approach, mostly > because it allows for the forward and bounce cases if somebody wants > to do some special handling there. I'd definitely like some feedback, > though, as I'm not quite happy with either idea. What about something that more specifically addresses the problem at hand? E.g. a reply-from hook, that takes the message object, and returns a Person object to be used as the from? Adding a hook is very low cost, so I'm not opposed to having fairly specific things like this. > P.S. William, I noticed your recent round of posts to the list lacked > In-Reply-To and References headers, so they didn't thread with the > posts they were replying to. Want to make sure you're aware of it. Yeah... I discovered on 4/27 that all my outgoing messages since 4/23 had been discarded. So I re-sent them with Sup's edit-as-new command, which doesn't preserve Reply-To and References headers. It probably should. Sorry! -- William From wmorgan-sup@masanjin.net Tue Apr 29 13:45:28 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 29 Apr 2008 10:45:28 -0700 Subject: [sup-talk] Gmail IMAP with sup In-Reply-To: References: <6038aa2a0804151530uae50bbbxc6b8eed49906fcf8@mail.gmail.com> <1208309556-sup-3399@archie> Message-ID: <1209490287-sup-9950@south> Reformatted excerpts from Miles Pomeroy's message of 2008-04-28: > > This is part of the sup philosophy. It treats mail sources as dumb > > stores, and doesn't try to change them. > > If this is part of sup philosophy then I'm assuming that it's not > going to change. Can someone explain to me why this is a good thing? I > use multiple computers and would like to use multiple clients to check > my email, but this philosophy seems to only allow for one computer, > one client. That's a good question and it deserves explanation. There are two issues. The first is simply pragmatic. Sup is never going to be able to compete with programs like Mutt in terms of operations like "open up a mailstore of some format X, and mark a bunch of messages as read, and move a bunch of messages to this other mailstore." That's a tremendous amount of work to get right, get safe and get fast, and Mutt's already done it well, and I sure don't want to have to reimplement it. The other issue is more philosophical, and that's that I ultimately view Sup as more of a service than as a MUA (even though it currently only has itself as a client and has been masquerading as a MUA for its entire life). I think the things that make Sup interesting and useful are the indexing and the flags, and those are things that don't translate to known mailstores at all. So in terms of multi-computer access, I would rather invest time in building up a sup-server program (which has been discussed here before, and I'm coming around to the idea, especially in light of things like Thrift) or a sup webserver (which currently exists in a proof-of-concept form) than to invest time in things that don't play to Sup's strengths. That said, if someone handed me a bunch of patches that does write back read/unread status to mailstores of whatever formats, I'd be more than happy to incorporate them. I'm just personally not going to spend a lot of development time on those features. -- William From marcus-sup@bar-coded.net Tue Apr 29 16:45:39 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Tue, 29 Apr 2008 21:45:39 +0100 Subject: [sup-talk] [PATCH] Gmail style attachment processing Message-ID: <1209501856-sup-1982@tomsk> This patch adds: * the search terms "filename" and "filetype" * hidden/reserved attachment label to track attachments * new flag on thread index mode to denote an attachment '@' * a "has:attachment" search query. You can now search for something like "from:phil* filetype:pdf" for all messages from a person called phil with a pdf attachment. You can also specify a file name for the attachment with "filename:(this is a filename with spaces.txt)". You can use wildcards in the filename ("filename:test*.pdf"). You can search for all messages from someone with attachments using "from:someone has:attachment" It will require sup-sync -all to work against all sources, but attempts to be backwards compatable with non-synced sources. --- lib/sup/index.rb | 17 ++++++++++++++++- lib/sup/label.rb | 6 +++--- lib/sup/message.rb | 8 +++++++- lib/sup/modes/thread-index-mode.rb | 3 ++- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/lib/sup/index.rb b/lib/sup/index.rb index f1ede55..12385d3 100644 --- a/lib/sup/index.rb +++ b/lib/sup/index.rb @@ -147,6 +147,7 @@ EOS field_infos.add_field :date, :index => :untokenized field_infos.add_field :body field_infos.add_field :label + field_infos.add_field :attachments field_infos.add_field :subject field_infos.add_field :from field_infos.add_field :to @@ -223,6 +224,7 @@ EOS :body => (entry[:body] || m.indexable_content), :snippet => snippet, # always override :label => labels.uniq.join(" "), + :attachments => (entry[:attachments] || m.attachments.uniq.join(" ")), :from => (entry[:from] || (m.from ? m.from.indexable_content : "")), :to => (entry[:to] || (m.to + m.cc + m.bcc).map { |x| x.indexable_content }.join(" ")), :subject => (entry[:subject] || wrap_subj(Message.normalize_subj(m.subj))), @@ -465,7 +467,7 @@ protected extraopts[:load_deleted] = true if subs =~ /\blabel:deleted\b/ ## gmail style "is" operator - subs = subs.gsub(/\b(is):(\S+)\b/) do + subs = subs.gsub(/\b(is|has):(\S+)\b/) do field, label = $1, $2 case label when "read" @@ -481,6 +483,19 @@ protected end end + ## gmail style attachments "filename" and "filetype" searches + subs = subs.gsub(/\b(filename|filetype):(\((.+?)\)\B|(\S+)\b)/) do + field, name = $1, ($3 || $4) + case field + when "filename" + Redwood::log "filename - translated #{field}:#{name} to attachments:(#{name.downcase})" + "attachments:(#{name.downcase})" + when "filetype" + Redwood::log "filetype - translated #{field}:#{name} to attachments:(*.#{name.downcase})" + "attachments:(*.#{name.downcase})" + end + end + if $have_chronic chronic_failure = false subs = subs.gsub(/\b(before|on|in|during|after):(\((.+?)\)\B|(\S+)\b)/) do diff --git a/lib/sup/label.rb b/lib/sup/label.rb index 4afc0f9..716ef98 100644 --- a/lib/sup/label.rb +++ b/lib/sup/label.rb @@ -5,13 +5,13 @@ class LabelManager ## labels that have special semantics. user will be unable to ## add/remove these via normal label mechanisms. - RESERVED_LABELS = [ :starred, :spam, :draft, :unread, :killed, :sent, :deleted, :inbox ] + RESERVED_LABELS = [ :starred, :spam, :draft, :unread, :killed, :sent, :deleted, :inbox, :attachment ] ## labels which it nonetheless makes sense to search for by - LISTABLE_RESERVED_LABELS = [ :starred, :spam, :draft, :sent, :killed, :deleted, :inbox ] + LISTABLE_RESERVED_LABELS = [ :starred, :spam, :draft, :sent, :killed, :deleted, :inbox, :attachment ] ## labels that will typically be hidden from the user - HIDDEN_RESERVED_LABELS = [ :starred, :unread ] + HIDDEN_RESERVED_LABELS = [ :starred, :unread, :attachment ] def initialize fn @fn = fn diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 249b6c6..5fc91de 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -37,7 +37,7 @@ class Message DEFAULT_SENDER = "(missing sender)" attr_reader :id, :date, :from, :subj, :refs, :replytos, :to, :source, - :cc, :bcc, :labels, :list_address, :recipient_email, :replyto, + :cc, :bcc, :labels, :attachments, :list_address, :recipient_email, :replyto, :source_info, :list_subscribe, :list_unsubscribe bool_reader :dirty, :source_marked_read, :snippet_contains_encrypted_content @@ -54,6 +54,7 @@ class Message @dirty = false @encrypted = false @chunks = nil + @attachments = [] ## we need to initialize this. see comments in parse_header as to ## why. @@ -405,6 +406,11 @@ private ## if there's a filename, we'll treat it as an attachment. if filename + # add this to the attachments list if its not a generated html + # attachment (should we allow images with generated names?). + # Lowercase the filename because searches are easier that way + @attachments.push filename.downcase unless filename =~ /^sup-attachment-/ + add_label :attachment unless filename =~ /^sup-attachment-/ [Chunk::Attachment.new(m.header.content_type, filename, m, sibling_types)] ## otherwise, it's body text diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 7a0b815..598c1ea 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -713,7 +713,8 @@ protected from + [ [subj_color, size_widget_text], - [:to_me_color, dp ? " >" : (p ? ' +' : " ")], + [:to_me_color, t.labels.member?(:attachment) ? "@" : " "], + [:to_me_color, dp ? ">" : (p ? '+' : " ")], [subj_color, t.subj + (t.subj.empty? ? "" : " ")], ] + (t.labels - @hidden_labels).map { |label| [:label_color, "+#{label} "] } + -- 1.5.4.1 From johnbent@lanl.gov Tue Apr 29 17:02:03 2008 From: johnbent@lanl.gov (John Bent) Date: Tue, 29 Apr 2008 15:02:03 -0600 Subject: [sup-talk] [PATCH] Gmail style attachment processing In-Reply-To: <1209501856-sup-1982@tomsk> References: <1209501856-sup-1982@tomsk> Message-ID: <1209502678-sup-1941@tangerine.lanl.gov> Excerpts from Marcus Williams's message of Tue Apr 29 14:45:39 -0600 2008: > This patch adds: > > * the search terms "filename" and "filetype" > * hidden/reserved attachment label to track attachments > * new flag on thread index mode to denote an attachment '@' > * a "has:attachment" search query. This is excellent. Thanks very much! I don't like doing the patches myself but I'm looking forward to this getting into next. From marcus-sup@bar-coded.net Tue Apr 29 17:12:43 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Tue, 29 Apr 2008 22:12:43 +0100 Subject: [sup-talk] [PATCH] Gmail style attachment processing In-Reply-To: <1209502678-sup-1941@tangerine.lanl.gov> References: <1209501856-sup-1982@tomsk> <1209502678-sup-1941@tangerine.lanl.gov> Message-ID: <1209502890-sup-4022@tomsk> On 29.4.2008, John Bent wrote: > This is excellent. Thanks very much! I don't like doing the patches > myself but I'm looking forward to this getting into next. :) I couldnt live without it in gmail so I had to have it in sup! I'd like to have added the regexanalyser suggested by William so that I could have a list of attachments on the message object just by querying the index but this affected searching usability a bit (I get a lot of attachments with spaces in and using the regexanalyser meant that you couldnt search for single words from that attachment without wildcards which didnt seem right). I may work on that a bit and add to this patch but for now it works really well for my usage. Marcus From bdwalton@gmail.com Tue Apr 29 20:07:23 2008 From: bdwalton@gmail.com (Ben Walton) Date: Tue, 29 Apr 2008 20:07:23 -0400 Subject: [sup-talk] question about contacts Message-ID: Hi All, I've been running sup all day (and importing old folders, etc). So far, I really like it although I've found a few bugs [I'll submit patches or bug reports when I find the cause]. I have a question about the display names used in threads. Aside from overriding the name/alias displayed with the contact manager, is there a way to tell sup to just 'let it be' for certain messages? We use the RT ticketing system at work and that sees the From: header be: "user at example.com via RT" . We have (many) users that don't bother to include a .sig or sign emails, so this identifier is sometimes the fastest way to determine the originator of the mail...can I make sup leave the display name alone on a mail-by-mail basis? Thanks -Ben -- --------------------------------------------------------------------------------------------------------------------------- Ben Walton When one person suffers from a delusion, it is called insanity. When many people suffer from a delusion it is called Religion. Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance --------------------------------------------------------------------------------------------------------------------------- From kevinr@mit.edu Wed Apr 30 07:41:06 2008 From: kevinr@mit.edu (Kevin Riggle) Date: Wed, 30 Apr 2008 07:41:06 -0400 Subject: [sup-talk] Crash report: C-\ in inbox-mode raises an exception Message-ID: <1209555404-sup-3139@black-opal> I accidentally hit -\ in inbox-mode in Sup, immediately after opening the application, which caused it to crash. ~/.sup/exception-log.txt contains: --- SignalException from thread: main SIGQUIT ./lib/sup/buffer.rb:31:in `select' ./lib/sup/buffer.rb:31:in `nonblocking_getch' bin/sup:227 FYI. - Kevin -- Kevin Riggle (kevinr at mit.edu) http://free-dissociation.com From kevinr@mit.edu Wed Apr 30 08:14:25 2008 From: kevinr@mit.edu (Kevin Riggle) Date: Wed, 30 Apr 2008 08:14:25 -0400 Subject: [sup-talk] skip_killed not getting set in default config Message-ID: <1209555731-sup-8618@black-opal> Hi, I've just started using Sup, and I quite like it. It's always wonderful to discover that someone else has developed *exactly the software you wanted*, and done such a bang-up job of it. Thank you! I have, however, run into a few bugs. At the moment, the most notable one is that killed threads would show up in my inbox again, +killed label and all, which sort of defeats the purpose of killing them. I poked around in the source and discovered the skip_killed option, which inbox-mode seems to initialize to true. When I added :skip_killed: true to the end of my ~/.sup/config.yaml, which had previously been exactly as sup-config created it, the killed threads no longer showed up in my inbox. I'm not sure if this means that skip_killed needs to be added to the default config in lib/sup.rb, or if the initialize method on inbox-mode isn't getting called, or if skip_killed is getting set to false elsewhere in the code, or something else, but any way it should Just Work for new users, and it's not right now. (I'm running Sup out of git, for reference -- commit 5b9eddb8a949c1a712d53ec8fe163de2848d5ac9.) - Kevin -- Kevin Riggle (kevinr at mit.edu) http://free-dissociation.com From bdwalton@gmail.com Wed Apr 30 14:50:52 2008 From: bdwalton@gmail.com (Ben Walton) Date: Wed, 30 Apr 2008 14:50:52 -0400 Subject: [sup-talk] [PATCH] maildir speedups Message-ID: Hi All, The attached small patch improves maildir performance by making the assumption that nothing will be modifying the underlying files themselves. It uses the mtimes of cur/ and new/ to mark whether or not to poll files in the directory. This sees the initial poll be a somewhat slow process (nfs for me again), but subsequent polls are much faster. I'm caching the mtimes in sources.yaml too, but currently this doesn't save anything across loads of sup since the id's (and id -> fn map) are not cached across restarts. I hope you find this useful. -Ben -- --------------------------------------------------------------------------------------------------------------------------- Ben Walton When one person suffers from a delusion, it is called insanity. When many people suffer from a delusion it is called Religion. Robert M. Pirsig, Zen and the Art of Motorcycle Maintenance --------------------------------------------------------------------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-maildir-speed-improvements.patch Type: text/x-patch Size: 4256 bytes Desc: not available URL: From tyberius_prime@coonabibba.de Wed Apr 30 10:12:48 2008 From: tyberius_prime@coonabibba.de (Tyberius Prime) Date: Wed, 30 Apr 2008 16:12:48 +0200 Subject: [sup-talk] question about contacts In-Reply-To: References: Message-ID: <1209564726-sup-7788@h984274.serverkompetenz.net> Excerpts from Ben Walton's message of Wed Apr 30 02:07:23 +0200 2008: > Hi All, > [snip] > > We use the RT ticketing system at work and that sees the From: header > be: "user at example.com via RT" . We have (many) > users that don't bother to include a .sig or sign emails, so this > identifier is sometimes the fastest way to determine the originator of > the mail...can I make sup leave the display name alone on a > mail-by-mail basis? > > Thanks > -Ben i, I would also be in favour of this feature (using rss2email, same problem, and of course the names imported from my 50k of emails are just weird... One of my own addresses shows up as "_Anna3 (by way of Tyberius Prime <... at mail.com>"! But I'm also interested behind the rationale to "unify" sender names like that (maybe there's a good reason that the both of us are missing)! So long, Tyberius Prime From wmorgan-sup@masanjin.net Wed Apr 30 21:04:38 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 30 Apr 2008 18:04:38 -0700 Subject: [sup-talk] [PATCH] reload label list on focus In-Reply-To: <1207086451-sup-7738@spooky.local> References: <1207082674-sup-4879@spooky.local> <1207086451-sup-7738@spooky.local> Message-ID: <1209603839-sup-8137@south> Reformatted excerpts from Grant Hollingworth's message of 2008-04-01: > 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. It's probably not ideal but we do the same thing elsewhere because it's simple. Applied directly to master. Thanks! -- William From wmorgan-sup@masanjin.net Wed Apr 30 21:13:02 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 30 Apr 2008 18:13:02 -0700 Subject: [sup-talk] [PATCH] Add tab-completion to multi add labels (;l) In-Reply-To: <1207338707-2047-1-git-send-email-marc.hartstein@alum.vassar.edu> References: <1207338707-2047-1-git-send-email-marc.hartstein@alum.vassar.edu> Message-ID: <1209604364-sup-4875@south> Applied directly to master. Thanks! -- William From wmorgan-sup@masanjin.net Wed Apr 30 21:27:02 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 30 Apr 2008 18:27:02 -0700 Subject: [sup-talk] [PATCH] Simple hook that runs when thread is marked as spam In-Reply-To: <1207823457-sup-5040@tomsk> References: <1207823457-sup-5040@tomsk> Message-ID: <1209605211-sup-6953@south> Reformatted excerpts from Marcus Williams's message of 2008-04-10: > This hook adds the ability to configure further actions that take place > when a user marks a thread as spam in sup. Merged into next. Thanks! -- William