From wmorgan-sup@masanjin.net Wed Jan 2 12:50:39 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 02 Jan 2008 09:50:39 -0800 Subject: [sup-talk] Backtrace with latest git In-Reply-To: <1199062549-sup-2436@indigo> References: <1199062549-sup-2436@indigo> Message-ID: <1199296151-sup-713@south> [completely faking this reply because my ISP dropped most of my email over the last few days... sigh.] Ingmar Vanhassel wrote: > At the risk of boring you to pieces: "thanks for sup! :-)". Finally a > mail client that does what we want, how we want it. Thanks, it's always good to hear. > As of latest git, I get a backtrace when I try to load more threads > than what the initial buffer shows. Backtrace attached. This should be fixed in git. Let me know if not. -- William From wmorgan-sup@masanjin.net Wed Jan 2 13:13:14 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 02 Jan 2008 10:13:14 -0800 Subject: [sup-talk] a lil' git script Message-ID: <1199297532-sup-1591@south> Slightly OT, but you guys might be interested in a little git staging script I hacked up, that does a darcs-style walkthrough of all unstaged changes. http://git-wt-commit.rubyforge.org/ -- William From wmorgan-sup@masanjin.net Fri Jan 4 00:04:53 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 03 Jan 2008 21:04:53 -0800 Subject: [sup-talk] Unit tests, part 2 In-Reply-To: <1197741811-sup-1386@arlanda> References: <1197741811-sup-1386@arlanda> Message-ID: <1199422670-sup-6990@south> Hi Ismo, Sorry for the delay on this. I've added the tests to git. Thank you very much! Excerpts from Ismo Puustinen's message of Sat Dec 15 10:25:35 -0800 2007: > The difference to previous tests is that this test actually currently > fails: for some reason, dividing a message body into chunks doesn't > succeed. The message in question is an actual email message sent to > vim-mac mailing list; only the names and email addresses have been > obscured. I selected the message for the tests because it kept > crashing my sup-sync. :-) Definitely an RMail bug. I've committed a workaround to git so that Sup doesn't crash, at least... -- William From patroclo7@gmail.com Fri Jan 4 17:54:48 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Fri, 4 Jan 2008 23:54:48 +0100 Subject: [sup-talk] Some initial problems with sup Message-ID: <20080104225448.GA19639@clarabella.clarabella> Hi, I am a new user of sup and I like it a lot. I plan to switch gradually from mutt. I have a first problem with gmail imap folders for Drafts and Sent Mail (the inbox works fine): their relative path is [Gmail]/Drafts and [Gmail]/Sent Mail. Thus they include a space and square brackets. If I try to use them in sources.yaml, but I get: /usr/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is not URI?): imaps://imap.gmail.com/[Gmail]/Drafts (URI::InvalidURIError) from /usr/lib/ruby/1.8/uri/common.rb:485:in `parse' from /usr/lib/ruby/1.8/uri/common.rb:608:in `URI' from /usr/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup/imap.rb:62:in `initialize' from /usr/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup.rb:29:in `new' from /usr/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup.rb:29:in `yaml_properties' from /usr/lib/ruby/1.8/yaml.rb:133:in `call' from /usr/lib/ruby/1.8/yaml.rb:133:in `transfer' from /usr/lib/ruby/1.8/yaml.rb:133:in `node_import' ... 7 levels... from /usr/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup/index.rb:108:in `load' from /usr/lib/ruby/gems/1.8/gems/sup-0.3/bin/sup-sync:111 from /usr/bin/sup-sync:16:in `load' from /usr/bin/sup-sync:16 I tried to escape them with \: uri: imaps://imap.gmail.com/\[Gmail\]/Drafts But I get exactly the same error message. Is there a proper way to escape the characters? Giorgio Lando From patroclo7@gmail.com Fri Jan 4 18:45:05 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sat, 05 Jan 2008 00:45:05 +0100 Subject: [sup-talk] missing run-mailcap Message-ID: <1199490036-sup-4674@clarabella.clarabella> A further problem: I am currently unable to convince sup to run my ~/.mailcap entries for attachment (the mimetypes is properly identified). Grepping in the sup directory, I see that it uses a /usr/bin/run-mailcap. I have not this in my linux system (archlinux), and I guess that it is something debian specific (I have not in my freebsd, and I do not remember to have seen it in my slackware system - not sure of this). I do not know how mailcap is used here (mutt resorts to it fine). Do you know where I could find run-mailcap? Giorgio Lando From patroclo7@gmail.com Fri Jan 4 18:59:41 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sat, 05 Jan 2008 00:59:41 +0100 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1199490036-sup-4674@clarabella.clarabella> References: <1199490036-sup-4674@clarabella.clarabella> Message-ID: <1199491102-sup-1332@clarabella.clarabella> > Do you know where I could find run-mailcap? > Giorgio Lando Do not mind about this, I have been able to extract it from the debian package and now it works Giorgio Lando From fedzor@gmail.com Fri Jan 4 19:02:29 2008 From: fedzor@gmail.com (thefed) Date: Fri, 4 Jan 2008 19:02:29 -0500 Subject: [sup-talk] Setting the Outgoing mail server Message-ID: <83922F2C-88AB-42E2-82A7-3D16ECDD6B26@gmail.com> Hey! Quick question - how can I set the outgoing mailserver? I'm trying to get gmail to work in sup. So far I can read emails, but not send them. Thanks, Ari From patroclo7@gmail.com Fri Jan 4 19:13:46 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sat, 5 Jan 2008 01:13:46 +0100 Subject: [sup-talk] Setting the Outgoing mail server In-Reply-To: <83922F2C-88AB-42E2-82A7-3D16ECDD6B26@gmail.com> References: <83922F2C-88AB-42E2-82A7-3D16ECDD6B26@gmail.com> Message-ID: <20080105001346.GA27329@clarabella.clarabella> On 19:02 Fri 04 Jan , thefed wrote: > Hey! > > Quick question - how can I set the outgoing mailserver? I'm trying to > get gmail to work in sup. So far I can read emails, but not send them. > > > Thanks, > Ari sup is a mua and relies on an MTA sendmail-compatible (something big like postfix or something light like esmtp etc) for outgoing mail. sup calls sendmail when you press y. Giorgio From wmorgan-sup@masanjin.net Fri Jan 4 19:09:55 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 04 Jan 2008 16:09:55 -0800 Subject: [sup-talk] Some initial problems with sup In-Reply-To: <20080104225448.GA19639@clarabella.clarabella> References: <20080104225448.GA19639@clarabella.clarabella> Message-ID: <1199491687-sup-7120@south> Excerpts from Giorgio Lando's message of Fri Jan 04 14:54:48 -0800 2008: > Hi, I am a new user of sup and I like it a lot. I plan to switch > gradually from mutt. Yay! > /usr/lib/ruby/1.8/uri/common.rb:436:in `split': bad URI(is not URI?): Bah. I thought I was going to be so cool by treating everything as a URI, but it's caused nothing but hassle. You need to URL-encode them. Something like this: $ irb -rcgi >> CGI::escape "[Drafts]" => "%5BDrafts%5D" HTH, -- William From wmorgan-sup@masanjin.net Fri Jan 4 19:13:15 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 04 Jan 2008 16:13:15 -0800 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1199490036-sup-4674@clarabella.clarabella> References: <1199490036-sup-4674@clarabella.clarabella> Message-ID: <1199491806-sup-1304@south> Excerpts from Giorgio Lando's message of Fri Jan 04 15:45:05 -0800 2008: > Grepping in the sup directory, I see that it uses a > /usr/bin/run-mailcap. I have not this in my linux system (archlinux), > and I guess that it is something debian specific (I have not in my > freebsd, and I do not remember to have seen it in my slackware system > - not sure of this). I do not know how mailcap is used here (mutt > resorts to it fine). > > Do you know where I could find run-mailcap? I don't have an actual answer for this, but if there's another option for handling MIME attachments on your system, I'm happy to include it. Run-mailcap was just what I had on hand at the time I was developing. It doesn't exist on Macs either. I'm just trying to avoid writing my own code to do this, since about a million other people have written that code already, and since it's pretty OS-dependent. -- William From wmorgan-sup@masanjin.net Fri Jan 4 19:15:54 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 04 Jan 2008 16:15:54 -0800 Subject: [sup-talk] Setting the Outgoing mail server In-Reply-To: <83922F2C-88AB-42E2-82A7-3D16ECDD6B26@gmail.com> References: <83922F2C-88AB-42E2-82A7-3D16ECDD6B26@gmail.com> Message-ID: <1199492006-sup-1223@south> Excerpts from thefed's message of Fri Jan 04 16:02:29 -0800 2008: > Quick question - how can I set the outgoing mailserver? I'm trying to > get gmail to work in sup. So far I can read emails, but not send them. Sup doesn't speak SMTP directly, and instead hands off outgoing emails to an external program. You can set this call in the :sendmail option of ~/.sup/config.yaml. There's a pretty good section on the wiki[1] on how to configure various mailers to do the right thing. [1] http://sup.rubyforge.org/wiki/wiki.pl -- William From patroclo7@gmail.com Fri Jan 4 19:57:26 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sat, 5 Jan 2008 01:57:26 +0100 Subject: [sup-talk] Some initial problems with sup In-Reply-To: <1199491687-sup-7120@south> References: <20080104225448.GA19639@clarabella.clarabella> <1199491687-sup-7120@south> Message-ID: <20080105005726.GB27329@clarabella.clarabella> > $ irb -rcgi > >> CGI::escape "[Drafts]" > => "%5BDrafts%5D" Thanks, this works (actually it doesn't work, but this depends from gmail: it seems that these names of folders are not right / do not exist in my account; nothing related to sup) Giorgio From patroclo7@gmail.com Fri Jan 4 20:01:14 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sat, 05 Jan 2008 02:01:14 +0100 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1199491806-sup-1304@south> References: <1199490036-sup-4674@clarabella.clarabella> <1199491806-sup-1304@south> Message-ID: <1199494725-sup-2394@clarabella.clarabella> > I don't have an actual answer for this, but if there's another option > for handling MIME attachments on your system, I'm happy to include it. > Run-mailcap was just what I had on hand at the time I was developing. > It doesn't exist on Macs either. > > I'm just trying to avoid writing my own code to do this, since about a > million other people have written that code already, and since it's > pretty OS-dependent. Do not mind, I am going to package a standalone run-mailcap for my distro (it will be a sup depo when I find the time to package sup & friends) Giorgio From patroclo7@gmail.com Sat Jan 5 07:58:50 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sat, 05 Jan 2008 13:58:50 +0100 Subject: [sup-talk] interface blinking and corrupted on the console Message-ID: <1199537691-sup-493@clarabella.clarabella> Hi, yet another issue. When I run sup on the plain console or on the framebuffer, it starts to beep and continues forever; everything blinks; keybindings seem to work (or at least I am able to get out with q). This does not happen in X; also if I run sup into a screen session on the onsole everything works fine. Looking at my environment variables, the only thing which seems to distinguish the plain console from screen on the console is the TERM variable, which on the console is set to "linux". I have no similar issues with other ncurses apps on the console. Should I set TERM to something else? Giorgio Lando From fedzor@gmail.com Sat Jan 5 09:49:02 2008 From: fedzor@gmail.com (thefed) Date: Sat, 5 Jan 2008 09:49:02 -0500 Subject: [sup-talk] sources Message-ID: <69CDDE4C-62DE-425E-ADB1-BDD931B25AEC@gmail.com> Is the URI in my config.yaml file the incoming mail server? From fedzor@gmail.com Sat Jan 5 09:51:38 2008 From: fedzor@gmail.com (thefed) Date: Sat, 5 Jan 2008 09:51:38 -0500 Subject: [sup-talk] IRC Message-ID: <44A764D0-D48E-49E2-9175-773D25BF9786@gmail.com> Hey! What's sup's IRC channel? I seem to remember seeing it somewhere but I can't find it. So what channel is it? Thanks, Ari Brown From patroclo7@gmail.com Sat Jan 5 12:11:10 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sat, 05 Jan 2008 18:11:10 +0100 Subject: [sup-talk] how to have an hook play a sound Message-ID: <1199552937-sup-9378@clarabella.clarabella> Hi again, I do not speak ruby and I am trying to write an after-poll.rb which plays a sound when there are new messages. I have tried several things, but probably I am misunderstanding something radical. I would like that it executes the sound when the variable @num (the number of polled messages) is >= 1. My less absurd try is perhaps: if @num>=1 system "/usr/bin/aplay -q " end but I get the following error: Error running hook: undefined method `>=' for nil:NilClass With: if @num!=0 system "/usr/bin/aplay -q " end The sound is always player, also when there is no new message polled. I have tried to define or declare a class or a method somewhere, but I am really lost. Any help? Giorgio Lando From wmorgan-sup@masanjin.net Sat Jan 5 13:33:14 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 05 Jan 2008 10:33:14 -0800 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199537691-sup-493@clarabella.clarabella> References: <1199537691-sup-493@clarabella.clarabella> Message-ID: <1199557847-sup-5728@south> Excerpts from Giorgio Lando's message of Sat Jan 05 04:58:50 -0800 2008: > Hi, yet another issue. When I run sup on the plain console or on the > framebuffer, it starts to beep and continues forever; everything > blinks; keybindings seem to work (or at least I am able to get out with > q). I believe this is because of the way we're trying to set the X window title. This patch should help temporarily: --- cut here --- diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index fa1afe6..7f0ad81 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -262,7 +262,7 @@ EOS get_status_and_title @focus_buf # must be called outside of the ncurses end - print "\033]2;#{title}\07" if title + #print "\033]2;#{title}\07" if title Ncurses.mutex.lock unless opts[:sync] == false --- cut here --- > This does not happen in X; also if I run sup into a screen session on > the onsole everything works fine. Looking at my environment variables, > the only thing which seems to distinguish the plain console from > screen on the console is the TERM variable, which on the console is > set to "linux". I have no similar issues with other ncurses apps on > the console. Does anyone know what the correct approach is for determining whether to set the title or not? Is it a matter of checking $TERM? -- William From wmorgan-sup@masanjin.net Sat Jan 5 13:34:47 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 05 Jan 2008 10:34:47 -0800 Subject: [sup-talk] sources In-Reply-To: <69CDDE4C-62DE-425E-ADB1-BDD931B25AEC@gmail.com> References: <69CDDE4C-62DE-425E-ADB1-BDD931B25AEC@gmail.com> Message-ID: <1199558077-sup-6458@south> Excerpts from thefed's message of Sat Jan 05 06:49:02 -0800 2008: > Is the URI in my config.yaml file the incoming mail server? There's a URI in your config.yaml!? -- William From wmorgan-sup@masanjin.net Sat Jan 5 13:37:12 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 05 Jan 2008 10:37:12 -0800 Subject: [sup-talk] IRC In-Reply-To: <44A764D0-D48E-49E2-9175-773D25BF9786@gmail.com> References: <44A764D0-D48E-49E2-9175-773D25BF9786@gmail.com> Message-ID: <1199558094-sup-2163@south> Excerpts from thefed's message of Sat Jan 05 06:51:38 -0800 2008: > What's sup's IRC channel? I seem to remember seeing it somewhere but I > can't find it. > > So what channel is it? There is none (that I know of!). By the Sup bylaws, you may only discuss Sup when using Sup. -- William From wmorgan-sup@masanjin.net Sat Jan 5 13:43:51 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 05 Jan 2008 10:43:51 -0800 Subject: [sup-talk] how to have an hook play a sound In-Reply-To: <1199552937-sup-9378@clarabella.clarabella> References: <1199552937-sup-9378@clarabella.clarabella> Message-ID: <1199558282-sup-230@south> Excerpts from Giorgio Lando's message of Sat Jan 05 09:11:10 -0800 2008: > Hi again, I do not speak ruby and I am trying to write an > after-poll.rb which plays a sound when there are new messages. No problem. You were just one small character away. > My less absurd try is perhaps: > > if @num>=1 > system "/usr/bin/aplay -q " > end Just remove the '@'. The variable 'num' is what you want; '@num' refers to a different, instance, variable. @num is undefined, so it defaults to 'nil', and that's why the error was about an undefined method on the nil object. (Incidentally, you can use instance variables to save state between successive calls to the same hook. Not useful in this case, but in more complex hooks this is handy.) > With: > > if @num!=0 > system "/usr/bin/aplay -q " > end > > The sound is always player, also when there is no new message polled. This is because nil is not equal to 0 in Ruby, so the conditional is always true. You can also check out the example hooks on the Wiki (http://sup.rubyforge.org/wiki/wiki.pl?Hooks). Feel free to post your masterpiece there when completed. -- William From fedzor@gmail.com Sat Jan 5 13:52:11 2008 From: fedzor@gmail.com (thefed) Date: Sat, 5 Jan 2008 13:52:11 -0500 Subject: [sup-talk] Removing Labels Message-ID: <94303BA6-0677-4C92-83A4-D3D3BEE68C3E@gmail.com> Hello all, Is there a way to REMOVE labels? I accidentally mislabeled some, and I, frustratingly, cannot alter them. Helpzor Pleasezor! -------------------------------------------------------| ~ Ari if god gives you lemons YOU FIND A NEW GOD From fedzor@gmail.com Sat Jan 5 14:29:40 2008 From: fedzor@gmail.com (thefed) Date: Sat, 5 Jan 2008 14:29:40 -0500 Subject: [sup-talk] (no subject) Message-ID: <03D098A5-5894-41A6-A43B-48F9BA1E201D@gmail.com> Hey, I have two GMail accounts, and they're (of course) on the same server. However, I am unable to add it in sup-add because it says it already knows of it. I am thinking of just altering the sources.yaml file and config.yaml, but I do not want to break my system. Help? Ari Brown From marcus-sup@bar-coded.net Sat Jan 5 15:11:14 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sat, 05 Jan 2008 20:11:14 +0000 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199557847-sup-5728@south> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> Message-ID: <1199563333-sup-1769@tomsk> On 5.1.2008, William Morgan wrote: > Does anyone know what the correct approach is for determining whether to > set the title or not? Is it a matter of checking $TERM? I think checking if $TERM is one of "xterm.*" and "rxvt.*". I'd also add "screen" to the list as well (because screen deals with it and my main usage of sup is during a screen session :) and maybe "cyg.*" for whatever the cygwin term variable is (I think its cygwin but might be cygterm cant remember). Needs to be a regex because you get stuff like xterm-color. Marcus From vasudeva@linkswarm.com Sat Jan 5 14:38:56 2008 From: vasudeva@linkswarm.com (vasudeva) Date: Sat, 5 Jan 2008 14:38:56 -0500 Subject: [sup-talk] IRC In-Reply-To: <1199558094-sup-2163@south> References: <44A764D0-D48E-49E2-9175-773D25BF9786@gmail.com> <1199558094-sup-2163@south> Message-ID: <20080105193856.GA31161@lenin.sovietwar.org> * on 01-05-08, William Morgan wrote: > Excerpts from thefed's message of Sat Jan 05 06:51:38 -0800 2008: > > What's sup's IRC channel? I seem to remember seeing it somewhere but I > > can't find it. > > > > So what channel is it? > > There is none (that I know of!). By the Sup bylaws, you may only discuss > Sup when using Sup. I'd idle in #sup. *** 14:14 >>> vasudeva joins #sup 14:14 -ChanServ(Cha1nServ at services.)- [#sup] Hello Ladies!!!! *** Not on freenode though, I guess. (Sup ladies.) /> References: <1199552937-sup-9378@clarabella.clarabella> <1199558282-sup-230@south> Message-ID: <1199568499-sup-4708@clarabella.clarabella> > Just remove the '@'. The variable 'num' is what you want; '@num' refers > to a different, instance, variable. @num is undefined, so it defaults to > 'nil', and that's why the error was about an undefined method on the nil > object. > > (Incidentally, you can use instance variables to save state between > successive calls to the same hook. Not useful in this case, but in more > complex hooks this is handy.) Thanks, now it sounds properly. As soon as I write something a bit more elaborate. I will publish it in the wiki for sure. Giorgio From patroclo7@gmail.com Sat Jan 5 16:32:26 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sat, 05 Jan 2008 22:32:26 +0100 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199557847-sup-5728@south> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> Message-ID: <1199568612-sup-4861@clarabella.clarabella> > I believe this is because of the way we're trying to set the X window > title. This patch should help temporarily: > > --- cut here --- > diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb > index fa1afe6..7f0ad81 100644 > --- a/lib/sup/buffer.rb > +++ b/lib/sup/buffer.rb > @@ -262,7 +262,7 @@ EOS > get_status_and_title @focus_buf # must be called outside of the ncurses > end > > - print "\033]2;#{title}\07" if title > + #print "\033]2;#{title}\07" if title > > Ncurses.mutex.lock unless opts[:sync] == false Yes, the patch fixes the issue. > > Does anyone know what the correct approach is for determining whether to > set the title or not? Is it a matter of checking $TERM? > It seems so, set title works fine both in *rxvt and screen for me, except for the fact that the title in screen persists after I quit sup; but this may be also seen as the correct behaviour. Giorgio From patroclo7@gmail.com Sat Jan 5 16:46:43 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sat, 05 Jan 2008 22:46:43 +0100 Subject: [sup-talk] the proper way of determining the encoding Message-ID: <1199569265-sup-4567@clarabella.clarabella> I had initially some problems with encoding in sup (accented chars were not displayed). So I have looked in lib/sup.rb and I have seen that sup tries to determine the $encoding from the $ctype, determined on its turn by LC_CTYPE and LANG. This failed in my case (I do not know why: my $LANG is it_IT and my $LC_ALL - implying $LC_CTYPE - is it_IT at euro). Anyway I guess that sup could/should use the environment variable $CHARSET, when it is defined, and resort to other methods only if $CHARSET is not defined. Or at least I have been able to fix my issue with encodings by changing the 55th line of lib/sup.rb in the following way: $encoding = ENV["CHARSET"] Cheers Giorgio From fedzor@gmail.com Sat Jan 5 16:58:44 2008 From: fedzor@gmail.com (thefed) Date: Sat, 5 Jan 2008 16:58:44 -0500 Subject: [sup-talk] Dealing with Attachments Message-ID: Really simple: How do I download the attachment included in an email? I've tried searching the docs, but to no luck. Any help is appreciated, Ari From fedzor@gmail.com Sat Jan 5 17:00:06 2008 From: fedzor@gmail.com (thefed) Date: Sat, 5 Jan 2008 17:00:06 -0500 Subject: [sup-talk] Multiple accounts on the same source Message-ID: <50BB997E-2741-475C-98BD-7806CDADAF9D@gmail.com> Hey, I have two GMail accounts, and they're (of course) on the same server. However, I am unable to add it in sup-add because it says it already knows of it. I am thinking of just altering the sources.yaml file and config.yaml, but I do not want to break my system. The first one works perfectly - it's just that I want the other to work too. Help? Ari Brown From marcus-sup@bar-coded.net Sat Jan 5 17:01:22 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sat, 05 Jan 2008 22:01:22 +0000 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199568612-sup-4861@clarabella.clarabella> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> <1199568612-sup-4861@clarabella.clarabella> Message-ID: <1199570335-sup-6528@tomsk> On 5.1.2008, Giorgio Lando wrote: > It seems so, set title works fine both in *rxvt and screen for me, > except for the fact that the title in screen persists after I quit sup; > but this may be also seen as the correct behaviour. I'd probably agree this is correct behaviour - vim does the same thing. I run my xterms with a title set in the bash prompt (so I get current host/user/directory in the xterm) so when I drop out of sup it changes to the bash set title. Marcus From marcus-sup@bar-coded.net Sat Jan 5 17:04:22 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sat, 05 Jan 2008 22:04:22 +0000 Subject: [sup-talk] Dealing with Attachments In-Reply-To: References: Message-ID: <1199570586-sup-7012@tomsk> On 5.1.2008, thefed wrote: > How do I download the attachment included in an email? Move your cursor (the blue line in thread view mode) over the attachment line (something like "x:attachment blah") and hit 's' to save somewhere or '|' to pipe it to an external program. Marcus From ingmar.stdin@gmail.com Sat Jan 5 17:14:00 2008 From: ingmar.stdin@gmail.com (Ingmar Vanhassel) Date: Sat, 05 Jan 2008 23:14:00 +0100 Subject: [sup-talk] Dealing with Attachments In-Reply-To: References: Message-ID: <1199571053-sup-8149@indigo> Excerpts from thefed's message of Sat Jan 05 22:58:44 +0100 2008: > Really simple: > > How do I download the attachment included in an email? Press 's' s : Save message/attachment to disk > I've tried searching the docs, but to no luck. Pressing the question mark in different buffers in sup will get you a list of possible actions and the keys to press. > Any help is appreciated, > Ari You're welcome, Ingmar From patroclo7@gmail.com Sun Jan 6 06:25:52 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sun, 06 Jan 2008 12:25:52 +0100 Subject: [sup-talk] Multiple accounts on the same source In-Reply-To: <50BB997E-2741-475C-98BD-7806CDADAF9D@gmail.com> References: <50BB997E-2741-475C-98BD-7806CDADAF9D@gmail.com> Message-ID: <1199618684-sup-9755@clarabella.clarabella> I guess that the --force-new option of sup-add could make what you want. Giorgio From marcus-sup@bar-coded.net Sun Jan 6 07:27:16 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sun, 06 Jan 2008 12:27:16 +0000 Subject: [sup-talk] Multiple accounts on the same source In-Reply-To: <50BB997E-2741-475C-98BD-7806CDADAF9D@gmail.com> References: <50BB997E-2741-475C-98BD-7806CDADAF9D@gmail.com> Message-ID: <1199622101-sup-9598@tomsk> On 5.1.2008, thefed wrote: > I have two GMail accounts, and they're (of course) on the same server. > > However, I am unable to add it in sup-add because it says it already > knows of it. William may have to confirm this, but this works for me: Either hand edit it in (but see below) or use a trick in the imap uri: imap://account1 at gmail.com/ imap://account2 at gmail.com/ The account1 and account2 bits can be anything you want - sup ignores them anyway (except when comparing two uris). But its useful to use so that you can distinguish between two sources. Note that if you dont use above and ever want to distinguish between your two gmail accounts via the source uri you wont be able to. So my recommendation is to use the trick above. Marcus From wmorgan-sup@masanjin.net Sun Jan 6 14:46:44 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 06 Jan 2008 11:46:44 -0800 Subject: [sup-talk] Email extensions/alternate emails In-Reply-To: <1197325495-sup-8186@tomsk> References: <1196423833-sup-2326@tomsk> <1197150436-sup-2569@south> <1197234773-sup-132@tomsk> <1197236481-sup-1886@south> <1197300448-sup-7359@tomsk> <1197308174-sup-2458@south> <1197325495-sup-8186@tomsk> Message-ID: <1199648703-sup-3204@south> Hi Marcus, Excerpts from Marcus Williams's message of Mon Dec 10 14:28:18 -0800 2007: > Not sure how I missed that, but there we go. Attached is a patch to > allow for mail extensions via regexes. This adds a :extensions: option > to the config.yaml something like: > > :extensions: > - marcus-sites-\*@domain.com > - marcus-lists-\*@domain.com I've added your patch to git after a few tweaks. I renamed "extensions" to "regexen" since really it does a full regex match against the entire email address. Hope you don't mind. :) Try it and let me know if it works for your current setup. Thanks! -- William From fedzor@gmail.com Sun Jan 6 17:34:46 2008 From: fedzor@gmail.com (thefed) Date: Sun, 6 Jan 2008 17:34:46 -0500 Subject: [sup-talk] Loading in 9500 messages Message-ID: Whats the best way to load 9000 messages from an IMAP server into sup? I tried doing the sup-sync method, but it kept crashing on me about 1000 messages in, and then it just had trouble even starting. THEN after that all the key commands stopped functioning (Possibly unrelated). So I reinstalled everything, but am still looking for a way to get those 9000 messages in From patroclo7@gmail.com Sun Jan 6 17:54:03 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sun, 06 Jan 2008 23:54:03 +0100 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199557847-sup-5728@south> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> Message-ID: <1199659920-sup-2577@clarabella.clarabella> Excerpts from William Morgan's message of Sat Jan 05 19:33:14 +0100 2008: > > I believe this is because of the way we're trying to set the X window > title. This patch should help temporarily: > > --- cut here --- > diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb > index fa1afe6..7f0ad81 100644 > --- a/lib/sup/buffer.rb > +++ b/lib/sup/buffer.rb > @@ -262,7 +262,7 @@ EOS > get_status_and_title @focus_buf # must be called outside of the ncurses > end > > - print "\033]2;#{title}\07" if title > + #print "\033]2;#{title}\07" if title > > Ncurses.mutex.lock unless opts[:sync] == false > Yes I confirm that this is the cause of blinking & corruption in the plain console, since the patch blocks this behaviour. Thanks again Giorgio From wmorgan-sup@masanjin.net Mon Jan 7 00:56:53 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 06 Jan 2008 21:56:53 -0800 Subject: [sup-talk] Removing Labels In-Reply-To: <94303BA6-0677-4C92-83A4-D3D3BEE68C3E@gmail.com> References: <94303BA6-0677-4C92-83A4-D3D3BEE68C3E@gmail.com> Message-ID: <1199685277-sup-7018@south> Excerpts from thefed's message of Sat Jan 05 10:52:11 -0800 2008: > Is there a way to REMOVE labels? I accidentally mislabeled some, and > I, frustratingly, cannot alter them. On a thread-by-thread basis, you can press 'l' to edit the set of labels applied to a thread. You can also use bin/sup-tweak-labels to systematically change the labels on all messages from a given source. -- William From wmorgan-sup@masanjin.net Mon Jan 7 01:04:21 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 06 Jan 2008 22:04:21 -0800 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1199569265-sup-4567@clarabella.clarabella> References: <1199569265-sup-4567@clarabella.clarabella> Message-ID: <1199685831-sup-2011@south> Excerpts from Giorgio Lando's message of Sat Jan 05 13:46:43 -0800 2008: > I had initially some problems with encoding in sup (accented chars > were not displayed). So I have looked in lib/sup.rb and I have seen > that sup tries to determine the $encoding from the $ctype, determined > on its turn by LC_CTYPE and LANG. This failed in my case (I do not > know why: my $LANG is it_IT and my $LC_ALL - implying $LC_CTYPE - is > it_IT at euro). The current way I choose the encoding is a complete hack, and clearly doesn't work for your case. (It looks for a . at the end of LANG or LC_CTYPE). But I'm not really sure what the correct way is. What does this command produce on your system? "locale -c LC_CTYPE | head -6". > $encoding = ENV["CHARSET"] I don't really want to use a non-standard environment variable if at all possible... -- William From wmorgan-sup@masanjin.net Mon Jan 7 01:15:57 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 06 Jan 2008 22:15:57 -0800 Subject: [sup-talk] Multiple accounts on the same source In-Reply-To: <1199622101-sup-9598@tomsk> References: <50BB997E-2741-475C-98BD-7806CDADAF9D@gmail.com> <1199622101-sup-9598@tomsk> Message-ID: <1199686504-sup-4157@south> Excerpts from Marcus Williams's message of Sun Jan 06 04:27:16 -0800 2008: > imap://account1 at gmail.com/ > > imap://account2 at gmail.com/ This is the official recommended best practice. Yet another reason I'm regretting having used URIs as source identifiers... -- William From wmorgan-sup@masanjin.net Mon Jan 7 01:17:05 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 06 Jan 2008 22:17:05 -0800 Subject: [sup-talk] Loading in 9500 messages In-Reply-To: References: Message-ID: <1199686580-sup-9110@south> Excerpts from thefed's message of Sun Jan 06 14:34:46 -0800 2008: > Whats the best way to load 9000 messages from an IMAP server into > sup? I tried doing the sup-sync method, but it kept crashing on me > about 1000 messages in, and then it just had trouble even starting. Sup-sync is the right approach. I'd be interested in looking at the error messages, since they "shouldn't happen". Are you using a release, or a git checkout? -- William From patroclo7@gmail.com Mon Jan 7 03:44:39 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Mon, 07 Jan 2008 09:44:39 +0100 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1199685831-sup-2011@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> Message-ID: <1199695396-sup-1028@clarabella.clarabella> > What does this command produce on your system? "locale -c LC_CTYPE | > head -6". It produces: LC_CTYPE upper;lower;alpha;digit;xdigit;space;print;graph;blank;cntrl;punct;alnum;combining;combining_level3 toupper;tolower;totitle 16 1 ISO-8859-15 And actually ISO-8859-15 is the right/desired encoding. Giorgio From patroclo7@gmail.com Mon Jan 7 03:51:08 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Mon, 07 Jan 2008 09:51:08 +0100 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1199685831-sup-2011@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> Message-ID: <1199695733-sup-2741@clarabella.clarabella> > > $encoding = ENV["CHARSET"] > > I don't really want to use a non-standard environment variable if at all > possible... I understand. May be the encoding problems are so intricate and heterogeneous that they could be worth a configuration option, so the user can in anyway force a certain encoding if needed/desired? Giorgio From marcus-sup@bar-coded.net Mon Jan 7 07:35:20 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Mon, 07 Jan 2008 12:35:20 +0000 Subject: [sup-talk] Email extensions/alternate emails In-Reply-To: <1199648703-sup-3204@south> References: <1196423833-sup-2326@tomsk> <1197150436-sup-2569@south> <1197234773-sup-132@tomsk> <1197236481-sup-1886@south> <1197300448-sup-7359@tomsk> <1197308174-sup-2458@south> <1197325495-sup-8186@tomsk> <1199648703-sup-3204@south> Message-ID: <1199709289-sup-624@tomsk> Excerpts from William Morgan's message of Sun Jan 06 19:46:44 +0000 2008: > I've added your patch to git after a few tweaks. I renamed "extensions" > to "regexen" since really it does a full regex match against the entire > email address. Hope you don't mind. :) Try it and let me know if it > works for your current setup. Nice :) Works here anyway! Marcus From patroclo7@gmail.com Mon Jan 7 17:59:01 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Mon, 07 Jan 2008 23:59:01 +0100 Subject: [sup-talk] backspace and delete keys Message-ID: <1199746454-sup-5936@clarabella.clarabella> Hi, I am busy in the ancient Unix practice of fixing the behaviour of Backspace and Delete in sup choosing the right escape sequence in the configuration of the different terminal emulators. Now, after some tweakings, Backspace works for me fine in the minibuffer in the console and in every terminal emulator, but Delete does not work. Since it does not work in any terminal, may be that simply the sup minibuffer editor is supposed to support only Backspace and not Delete? In this case, I am loosing my time :) Can someone confirm this? Giorgio Lando From wmorgan-sup@masanjin.net Mon Jan 7 19:12:08 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 07 Jan 2008 16:12:08 -0800 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199746454-sup-5936@clarabella.clarabella> References: <1199746454-sup-5936@clarabella.clarabella> Message-ID: <1199750582-sup-5731@south> Excerpts from Giorgio Lando's message of Mon Jan 07 14:59:01 -0800 2008: > Hi, I am busy in the ancient Unix practice of fixing the behaviour of > Backspace and Delete in sup choosing the right escape sequence in the > configuration of the different terminal emulators. I feel your pain. > Now, after some tweakings, Backspace works for me fine in the > minibuffer in the console and in every terminal emulator, but Delete > does not work. Since it does not work in any terminal, may be that > simply the sup minibuffer editor is supposed to support only > Backspace and not Delete? Sorry about that. I've just added it now. Git pull and you should be able to hit delete. -- William From patroclo7@gmail.com Mon Jan 7 19:22:00 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Tue, 08 Jan 2008 01:22:00 +0100 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199750582-sup-5731@south> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> Message-ID: <1199751709-sup-9184@clarabella.clarabella> > Sorry about that. I've just added it now. Git pull and you should be > able to hit delete. Thanks a lot! Yes it works! Giorgio From nicolas.pouillard@gmail.com Mon Jan 7 20:34:02 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 08 Jan 2008 02:34:02 +0100 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199750582-sup-5731@south> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> Message-ID: <1199756019-sup-216@ausone.local> Excerpts from William Morgan's message of Tue Jan 08 01:12:08 +0100 2008: > Excerpts from Giorgio Lando's message of Mon Jan 07 14:59:01 -0800 2008: > > Hi, I am busy in the ancient Unix practice of fixing the behaviour of > > Backspace and Delete in sup choosing the right escape sequence in the > > configuration of the different terminal emulators. > > I feel your pain. > > > Now, after some tweakings, Backspace works for me fine in the > > minibuffer in the console and in every terminal emulator, but Delete > > does not work. Since it does not work in any terminal, may be that > > simply the sup minibuffer editor is supposed to support only > > Backspace and not Delete? > > Sorry about that. I've just added it now. Git pull and you should be > able to hit delete. > Thanks! -- Nicolas Pouillard aka Ertai From nicolas.pouillard@gmail.com Mon Jan 7 20:40:44 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 8 Jan 2008 02:40:44 +0100 Subject: [sup-talk] [PATCH] message.rb: Fix the usage of error_message and Chunk::Text.new. Message-ID: <11997564441282-git-send-email-nicolas.pouillard@gmail.com> --- lib/sup/message.rb | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sup/message.rb b/lib/sup/message.rb index b342ea5..01008ed 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -163,7 +163,7 @@ class Message def load_from_source! @chunks ||= if @source.has_errors? - [Chunk::Text.new(error_message(@source.error.message.split("\n")))] + [Chunk::Text.new(error_message(@source.error.message).split("\n"))] else begin ## we need to re-read the header because it contains information @@ -182,7 +182,7 @@ class Message ## up the error message one @source.error ||= e Redwood::report_broken_sources :force_to_top => true - [Chunk::Text.new(error_message(e.message))] + [Chunk::Text.new(error_message(e.message).split("\n"))] end end end -- 1.5.3.1.109.gacd69 From nicolas.pouillard@gmail.com Mon Jan 7 20:42:56 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 8 Jan 2008 02:42:56 +0100 Subject: [sup-talk] [PATCH] encoding, fix: Normalize UTF8 and UTF_8 to utf8, to please iconv. Message-ID: <11997565763275-git-send-email-nicolas.pouillard@gmail.com> --- lib/sup/message.rb | 1 + lib/sup/rfc2047.rb | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 01008ed..53ab2a6 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -391,6 +391,7 @@ private end def self.convert_from body, charset + charset = "utf-8" if charset =~ /UTF_?8/i begin raise MessageFormatError, "RubyMail decode returned a null body" unless body return body unless charset diff --git a/lib/sup/rfc2047.rb b/lib/sup/rfc2047.rb index 10ad7e0..947de02 100644 --- a/lib/sup/rfc2047.rb +++ b/lib/sup/rfc2047.rb @@ -52,6 +52,8 @@ module Rfc2047 # WORD. end + charset = "utf-8" if charset =~ /UTF_?8/i + # Convert: # # Remember - Iconv.open(to, from)! -- 1.5.3.1.109.gacd69 From nicolas.pouillard@gmail.com Mon Jan 7 20:43:51 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 8 Jan 2008 02:43:51 +0100 Subject: [sup-talk] [PATCH] fix: Add parentheses since `||' binds more than `or'. Message-ID: <11997566312863-git-send-email-nicolas.pouillard@gmail.com> --- lib/sup/modes/compose-mode.rb | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sup/modes/compose-mode.rb b/lib/sup/modes/compose-mode.rb index 3c92fd2..f063b92 100644 --- a/lib/sup/modes/compose-mode.rb +++ b/lib/sup/modes/compose-mode.rb @@ -21,9 +21,9 @@ class ComposeMode < EditMessageMode def self.spawn_nicely opts={} to = opts[:to] || BufferManager.ask_for_contacts(:people, "To: ") or return - cc = opts[:cc] || BufferManager.ask_for_contacts(:people, "Cc: ") or return if $config[:ask_for_cc] - bcc = opts[:bcc] || BufferManager.ask_for_contacts(:people, "Bcc: ") or return if $config[:ask_for_bcc] - subj = opts[:subj] || BufferManager.ask(:subject, "Subject: ") or return if $config[:ask_for_subject] + cc = opts[:cc] || (BufferManager.ask_for_contacts(:people, "Cc: ") or return if $config[:ask_for_cc]) + bcc = opts[:bcc] || (BufferManager.ask_for_contacts(:people, "Bcc: ") or return if $config[:ask_for_bcc]) + subj = opts[:subj] || (BufferManager.ask(:subject, "Subject: ") or return if $config[:ask_for_subject]) mode = ComposeMode.new :from => opts[:from], :to => to, :cc => cc, :bcc => bcc, :subj => subj BufferManager.spawn "New Message", mode -- 1.5.3.1.109.gacd69 From patroclo7@gmail.com Mon Jan 7 22:24:50 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Tue, 08 Jan 2008 04:24:50 +0100 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199751709-sup-9184@clarabella.clarabella> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> Message-ID: <1199762547-sup-3379@clarabella.clarabella> However the git version now gets an exception and quits when some keys are pressed ( \, /, ? and some others). The following is the sup-exception-log.txt: --- NameError from thread: main uninitialized constant Redwood::InputSequenceAborted aur/sources/sup/bin/sup:209 Regards Giorgio From wmorgan-sup@masanjin.net Tue Jan 8 01:36:35 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 07 Jan 2008 22:36:35 -0800 Subject: [sup-talk] [PATCH] message.rb: Fix the usage of error_message and Chunk::Text.new. In-Reply-To: <11997564441282-git-send-email-nicolas.pouillard@gmail.com> References: <11997564441282-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1199774177-sup-8083@south> Applied, thanks. -- William From wmorgan-sup@masanjin.net Tue Jan 8 01:36:48 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 07 Jan 2008 22:36:48 -0800 Subject: [sup-talk] [PATCH] encoding, fix: Normalize UTF8 and UTF_8 to utf8, to please iconv. In-Reply-To: <11997565763275-git-send-email-nicolas.pouillard@gmail.com> References: <11997565763275-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1199774201-sup-7114@south> Applied, thanks. -- William From wmorgan-sup@masanjin.net Tue Jan 8 01:39:41 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 07 Jan 2008 22:39:41 -0800 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199762547-sup-3379@clarabella.clarabella> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> Message-ID: <1199774271-sup-9832@south> Excerpts from Giorgio Lando's message of Mon Jan 07 19:24:50 -0800 2008: > However the git version now gets an exception and quits when some keys > are pressed ( \, /, ? and some others). I can't reproduce this. The backtrace also doesn't make sense, unless buffer.rb (loaded by sup.rb) somehow isn't being loaded. That's where InterruptedSequenceException is defined... have you made any changes locally that may have caused this? -- William From wmorgan-sup@masanjin.net Tue Jan 8 01:37:40 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 07 Jan 2008 22:37:40 -0800 Subject: [sup-talk] [PATCH] fix: Add parentheses since `||' binds more than `or'. In-Reply-To: <11997566312863-git-send-email-nicolas.pouillard@gmail.com> References: <11997566312863-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1199774246-sup-6042@south> Applied, thanks! Git is fun. -- William From patroclo7@gmail.com Tue Jan 8 06:31:56 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Tue, 08 Jan 2008 12:31:56 +0100 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199774271-sup-9832@south> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> Message-ID: <1199791609-sup-7134@clarabella.clarabella> > I can't reproduce this. The backtrace also doesn't make sense, unless > buffer.rb (loaded by sup.rb) somehow isn't being loaded. That's where > InterruptedSequenceException is defined... have you made any changes > locally that may have caused this? I have tried to git clone from scratch but it still happens: with all non-alphabetic keys, except 0, 1, @, &, $ and well... perhaps I have not tried all of them, but surely with \, the numbers from 2 to 9, quotes. I do not know if something goes wrong in my environment, but 0.3 still works fine. I have also tried to remove my two hooks, but with no impact Giorgio From wmorgan-sup@masanjin.net Tue Jan 8 10:34:28 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 08 Jan 2008 07:34:28 -0800 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199791609-sup-7134@clarabella.clarabella> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> <1199791609-sup-7134@clarabella.clarabella> Message-ID: <1199806348-sup-6626@south> Excerpts from Giorgio Lando's message of Tue Jan 08 03:31:56 -0800 2008: > I have tried to git clone from scratch but it still happens: > with all non-alphabetic keys, except 0, 1, @, &, $ and well... perhaps I > have not tried all of them, but surely with \, the numbers from 2 to 9, > quotes. > I do not know if something goes wrong in my environment, but 0.3 > still works fine. > I have also tried to remove my two hooks, but with no impact I'm willing to bet that this is because it's still loading 0.3 libraries. Try removing the 0.3 gem entirely before running from git. -- William From patroclo7@gmail.com Tue Jan 8 11:21:23 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Tue, 08 Jan 2008 17:21:23 +0100 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199806348-sup-6626@south> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> <1199791609-sup-7134@clarabella.clarabella> <1199806348-sup-6626@south> Message-ID: <1199809040-sup-2026@clarabella.clarabella> > I'm willing to bet that this is because it's still loading 0.3 > libraries. Try removing the 0.3 gem entirely before running from git. Yes, now it works. Sorry, I wasn't aware that I needed to do that. I had tried to adjust the -I option of ruby, but with no luck. Is there in general a way to have the release and the git version coexisting? Giorgio From wmorgan-sup@masanjin.net Tue Jan 8 11:40:49 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 08 Jan 2008 08:40:49 -0800 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199809040-sup-2026@clarabella.clarabella> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> <1199791609-sup-7134@clarabella.clarabella> <1199806348-sup-6626@south> <1199809040-sup-2026@clarabella.clarabella> Message-ID: <1199810397-sup-8123@south> Excerpts from Giorgio Lando's message of Tue Jan 08 08:21:23 -0800 2008: > Yes, now it works. Sorry, I wasn't aware that I needed to do that. I > had tried to adjust the -I option of ruby, but with no luck. Is there > in general a way to have the release and the git version coexisting? This issue has bitten several people before, including me. Let me see if I can come up with a way around it. -- William From wmorgan-sup@masanjin.net Tue Jan 8 12:23:03 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 08 Jan 2008 09:23:03 -0800 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199810397-sup-8123@south> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> <1199791609-sup-7134@clarabella.clarabella> <1199806348-sup-6626@south> <1199809040-sup-2026@clarabella.clarabella> <1199810397-sup-8123@south> Message-ID: <1199812350-sup-1695@south> Excerpts from William Morgan's message of Tue Jan 08 08:40:49 -0800 2008: > This issue has bitten several people before, including me. Let me see > if I can come up with a way around it. Weird. I could've sworn I'd seen it before, but after reinstalling the 0.3 gem, ruby -Ilib bin/sup still works fine. What's your gem version? I'm at 0.9.0. -- William From patroclo7@gmail.com Tue Jan 8 12:32:54 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Tue, 08 Jan 2008 18:32:54 +0100 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199812350-sup-1695@south> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> <1199791609-sup-7134@clarabella.clarabella> <1199806348-sup-6626@south> <1199809040-sup-2026@clarabella.clarabella> <1199810397-sup-8123@south> <1199812350-sup-1695@south> Message-ID: <1199813518-sup-5839@clarabella.clarabella> > What's your gem version? I'm at 0.9.0. The version of gem is 0.9.4. May be I should clarify the scenario where the exception happened. I had sup-0.3 in the standard gems system directory ans sup-git in a folder in my home directory. I cd to the sup-git folder and did ruby -Ilib -w sup. Now I have simply moved the sup-git directory in the standard gems system directory. Giorgio Lando From patroclo7@gmail.com Tue Jan 8 13:42:59 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Tue, 08 Jan 2008 19:42:59 +0100 Subject: [sup-talk] supprint works fine Message-ID: <1199817673-sup-5225@clarabella.clarabella> If anyone is interested, sup interacts perfectly with muttprint. It is enough to pipe a message to muttprint through the | shortcut in the git version of sup. So the only problem with muttprint is that it should be renamed... Giorgio From 5srmspw02@sneakemail.com Tue Jan 8 22:39:18 2008 From: 5srmspw02@sneakemail.com (Guarded Identity) Date: Tue, 08 Jan 2008 21:39:18 -0600 Subject: [sup-talk] New User Questions Message-ID: <29393-78803@sneakemail.com> Hello everyone, First off. William, thanks a lot for all the work. The Mutt home page has always had this quote: "All mail clients suck. This one [mutt] just sucks less." I know Sup has room for more features and functionality, but it my mind, it's no where near sucking, especially with the option of using sup-console or Ruby scripts using Redwood libraries. Having just gotten started, I have a slew of questions. I'll try to organize/enumerate them below to help with in-line responses. I'm using maildirs as opposed to mboxes. I've always preferred maildirs over mboxes to avoid dealing with gigantic mail files. 1. Can sent mail only be stored in an mbox, or are other formats supported? I haven't gotten around to digging deeply into Sup's source, so I'm not sure about the details of how E-mails are indexed. I know Sup doesn't play well with other MUAs. The FAQ discusses mboxes pretty well. I was hoping for a little more discussion of how modification of maildir mail by other MUAs affects Sup. For instance, the maildir specification has mail put in $MAILDIR/new/ until read by a MUA, which should move the mail to $MAILDIR/cur/ to mark the mail as "seen". 2. Will migration of maildir mail from new/ to cur/ necessitate an execution of sup-sync? Also, "read" flags (and others) are stored in the Maildir filename. 3. If the filename of maildir mail changes, is a sup-sync required? If 2. or 3. are indeed problems, maybe I could front the maildir sources with an IMAP server. I had done this before, actually, but I noticed that Sup indexing was slowed down quite a bit (rss2email and mailing lists generate a lot of new mail). If I do go with IMAP, I guess I could sequence a sup-sync right after my crontab call to fetchmail to help with indexing? I just wasn't keen on Sup being locked out periodically by crontab. Alternatively, I could move all my Maildirs into mboxes. I know Sup has a bias towards not deleting mail, but sup-sync-back is there for mboxes. 4. How far away is sup-sync-back support for maildirs or IMAP? Is the work straight-forward or are there some technical kinks to be ironed out? 5. Should I consider using mboxes for any reason beyond support by sup-sync-back? Also, I would really like to have time-based auto-expiry (excluding starred or special-labeled items) for some of my mail (primarily mailing lists and rss feeds). With mboxes, I guess I could do some "deleted"-labeling with a Ruby script followed by a call to sup-sync-back. 6. What are my scripting options for mail expiry with Maildirs? The search to get the message objects is pretty straight forward. How much further work is it to delete the message from the index and to get a filename of the message to delete from the maildir? Also, I kind of miss urlview. 7. Any proposal for easily opening urls from messages? urlview is already coded up, so I'm all for a mechanism for piping messages into an external application. But this leads to other design issues, I think, like how to enable user-level key bindings. I have few questions regarding hooks and threading: 8. I'm a little confused about threading interacts with labeling in Sup. Labels are applied to entire threads, but it seems that labels are stored on a per-mail basis. Is seems possible for message within a thread to have different labels, say by using a before-add-message.rb hook. Is the label set for the thread a union of all the labels of its constituents? 9. If a new message comes into a thread, is it auto-labeled with the labels of the thread? 10. I tried to do some auto-archiving with the before-add-message.rb hook using message.remove_label("inbox"), but it didn't work. Is this possible? Or is auto-archiving only possible at the source level? Finally. . . 11. Is it possible to search for mail that has no labels without saying "!label:label1 AND !label:label2 AND ..."? I looked a little in the Ferret documentation, but didn't find a way. I was trying to do this to get at some mail I archived accidentally before applying labels. That's what I've got for now. I hope I didn't overwhelm the list with a lot of stupid questions. Thanks for your help, Sukant From wmorgan-sup@masanjin.net Wed Jan 9 11:09:48 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 09 Jan 2008 08:09:48 -0800 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199563333-sup-1769@tomsk> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> <1199563333-sup-1769@tomsk> Message-ID: <1199894905-sup-3585@south> Excerpts from Marcus Williams's message of Sat Jan 05 12:11:14 -0800 2008: > I think checking if $TERM is one of "xterm.*" and "rxvt.*". I'd also > add "screen" to the list as well (because screen deals with it and my > main usage of sup is during a screen session :) and maybe "cyg.*" for > whatever the cygwin term variable is (I think its cygwin but might be > cygterm cant remember). Needs to be a regex because you get stuff > like xterm-color. Ok, I just committed this to git master: commit 9722a770cadd44ddc4af6ddcb56eb8edb35c93b9 Author: William Morgan Date: Wed Jan 9 08:06:39 2008 -0800 only set terminal title if $TERM is an xterm or rxvt variant diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index fa1afe6..782695b 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -63,6 +63,7 @@ class Buffer @title = opts[:title] || "" @force_to_top = opts[:force_to_top] || false @x, @y, @width, @height = 0, 0, width, height + @in_x = ENV["TERM"] =~ /(xterm|rxvt)/ end def content_height; @height - 1; end @@ -262,7 +263,7 @@ EOS get_status_and_title @focus_buf # must be called outside of the ncurses end - print "\033]2;#{title}\07" if title + print "\033]2;#{title}\07" if title && @in_x Ncurses.mutex.lock unless opts[:sync] == false -- William From patroclo7@gmail.com Wed Jan 9 12:49:18 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Wed, 09 Jan 2008 18:49:18 +0100 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199894905-sup-3585@south> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> <1199563333-sup-1769@tomsk> <1199894905-sup-3585@south> Message-ID: <1199900856-sup-8306@clarabella.clarabella> > only set terminal title if $TERM is an xterm or rxvt variant Thanks. It would be nice if you could add the screen variants, because it works fine in screen, as someone else already noted. Giorgio From wmorgan-sup@masanjin.net Wed Jan 9 12:57:31 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 09 Jan 2008 09:57:31 -0800 Subject: [sup-talk] new in git: 'next' branch Message-ID: <1199901343-sup-7480@south> As part of a general effort to make Sup development both more organized and easier to contribute to, I've created a branch on the shared repo called "next". I'm going to try and push any changes not obviously trivial to next, and only migrate them to master once they've had some exposure. The goal is that, if you track master, you should get a Sup that's just as stable as a distribution, if not more so, and if you track next, you should get a Sup that has the latest and greatest features, but might break every once in a while. Neither of these branches will be rebased, which means, for those of you not intimately familiar with git arcana, that a "git pull" will always work (module changes you've made locally, of course). GIT CRASH-COURSE ---------------- To track next, command your computer as follows: $ git branch next origin/next Branch next set up to track remote branch refs/remotes/origin/next. $ git checkout next Switched to branch "next" $ git pull Already up-to-date. You can switch back to master with "git checkout master". Note that git won't let you switch if you have uncommitted changes, so make use of "git stash" to stash them away with a nice label. -- William From wmorgan-sup@masanjin.net Wed Jan 9 13:00:53 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 09 Jan 2008 10:00:53 -0800 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1199695733-sup-2741@clarabella.clarabella> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> Message-ID: <1199901555-sup-2661@south> Excerpts from Giorgio Lando's message of Mon Jan 07 00:51:08 -0800 2008: > I understand. May be the encoding problems are so intricate and > heterogeneous that they could be worth a configuration option, so the > user can in anyway force a certain encoding if needed/desired? I'm certainly happy to allow users to force a certain encoding, but I think largely issue of encoding problems HAS been solved (at least on Unixes) by locale and all the LC_* environment variables. I'm certainly not an export on this stuff, though. I just committed the following terrible patch to next, which should properly find everyone's locale, if they have a locale. Mac users, I'd love to know if this actually works for you. commit 6af3048fe82f48f0368a619ea785f0a394b0bbd4 Author: William Morgan Date: Wed Jan 9 08:30:30 2008 -0800 detect character set correctly (but unix-centrically) diff --git a/lib/sup.rb b/lib/sup.rb index 25809dd..5bb27ba 100644 --- a/lib/sup.rb +++ b/lib/sup.rb @@ -49,16 +49,6 @@ module Redwood YAML_DOMAIN = "masanjin.net" YAML_DATE = "2006-10-01" -## determine encoding and character set -## probably a better way to do this - $ctype = ENV["LC_CTYPE"] || ENV["LANG"] || "en-US.utf-8" - $encoding = - if $ctype =~ /\.(.*)?/ - $1 - else - "utf-8" - end - ## record exceptions thrown in threads nicely def reporting_thread name if $opts[:no_threads] @@ -235,6 +225,16 @@ module Redwood module_function :log end +## determine encoding and character set. there MUST be a better way to +## do this. + $encoding = `locale -c LC_CTYPE|head -6|tail -1`.chomp + if $encoding + Redwood::log "using character set encoding #{$encoding.inspect}" + else + Redwood::log "warning: can't find character set by using locale, defaulting + $encoding = "utf-8" + end + ## now everything else (which can feel free to call Redwood::log at load time) require "sup/update" require "sup/suicide" -- William From wmorgan-sup@masanjin.net Wed Jan 9 13:09:12 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 09 Jan 2008 10:09:12 -0800 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199900856-sup-8306@clarabella.clarabella> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> <1199563333-sup-1769@tomsk> <1199894905-sup-3585@south> <1199900856-sup-8306@clarabella.clarabella> Message-ID: <1199902136-sup-4582@south> Excerpts from Giorgio Lando's message of Wed Jan 09 09:49:18 -0800 2008: > Thanks. It would be nice if you could add the screen variants, because > it works fine in screen, as someone else already noted. Whoops. Added! -- William From wmorgan-sup@masanjin.net Wed Jan 9 14:02:47 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 09 Jan 2008 11:02:47 -0800 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199813518-sup-5839@clarabella.clarabella> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> <1199791609-sup-7134@clarabella.clarabella> <1199806348-sup-6626@south> <1199809040-sup-2026@clarabella.clarabella> <1199810397-sup-8123@south> <1199812350-sup-1695@south> <1199813518-sup-5839@clarabella.clarabella> Message-ID: <1199905135-sup-2008@south> Excerpts from Giorgio Lando's message of Tue Jan 08 09:32:54 -0800 2008: > The version of gem is 0.9.4. May be I should clarify the scenario > where the exception happened. I had sup-0.3 in the standard gems > system directory ans sup-git in a folder in my home directory. I cd to > the sup-git folder and did ruby -Ilib -w sup. That was my setup too. Weird that I no longer seem to have this problem. I've committed the following patch to next, which explicitly versions bin/sup and lib/sup.rb and compares the two upon startup. Hopefully this should detect this type of situation. For those of you who like to play with sup via "rake gem", gems built from your checkout will have version 999. (This was a suggestion Ian Taylor made a long time ago.) diff --git a/Rakefile b/Rakefile index 1932f62..33e9883 100644 --- a/Rakefile +++ b/Rakefile @@ -7,7 +7,12 @@ class Hoe def extra_deps; @extra_deps.reject { |x| Array(x).first == "hoe" } end end # thanks to "Mike H" -Hoe.new('sup', Redwood::VERSION) do |p| +## allow people who use development versions by running "rake gem" +## and installing the resulting gem it to be able to do this. (gem +## versions must be in dotted-digit notation only). +version = Redwood::VERSION == "git" ? 999 : Redwood::VERSION + +Hoe.new('sup', version) do |p| p.rubyforge_name = 'sup' p.author = "William Morgan" p.summary = 'A console-based email client with the best features of GMail, mutt, and emacs. Features full text search, labels, tagged operations, multiple buffers, recent contacts, and more.' diff --git a/bin/sup b/bin/sup index 0f48ab4..7314227 100644 --- a/bin/sup +++ b/bin/sup @@ -7,6 +7,20 @@ require 'fileutils' require 'trollop' require "sup" +BIN_VERSION = "git" + +unless Redwood::VERSION == BIN_VERSION + $stderr.puts < From marcus-sup@bar-coded.net Wed Jan 9 16:09:47 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Wed, 09 Jan 2008 21:09:47 +0000 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199894905-sup-3585@south> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> <1199563333-sup-1769@tomsk> <1199894905-sup-3585@south> Message-ID: <1199912893-sup-5782@tomsk> Excerpts from William Morgan's message of Wed Jan 09 16:09:48 +0000 2008: > Ok, I just committed this to git master: > > commit 9722a770cadd44ddc4af6ddcb56eb8edb35c93b9 > Author: William Morgan > Date: Wed Jan 9 08:06:39 2008 -0800 > > only set terminal title if $TERM is an xterm or rxvt variant I get lots of @in_x not initialised errors at the terminal title line (that ends && @in_x) Is the initialise routine called before the buffer titles are set? Marcus From wmorgan-sup@masanjin.net Wed Jan 9 18:02:05 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 09 Jan 2008 15:02:05 -0800 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199912893-sup-5782@tomsk> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> <1199563333-sup-1769@tomsk> <1199894905-sup-3585@south> <1199912893-sup-5782@tomsk> Message-ID: <1199919253-sup-9556@south> Excerpts from Marcus Williams's message of Wed Jan 09 13:09:47 -0800 2008: > I get lots of @in_x not initialised errors at the terminal title line > (that ends && @in_x) Is the initialise routine called before the > buffer titles are set? Whoops, I did something silly. Try it now. I just applied: diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index f724f88..2a78787 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -63,7 +63,6 @@ class Buffer @title = opts[:title] || "" @force_to_top = opts[:force_to_top] || false @x, @y, @width, @height = 0, 0, width, height - @in_x = ENV["TERM"] =~ /(xterm|rxvt|screen)/ end def content_height; @height - 1; end @@ -178,6 +177,7 @@ EOS @textfields = {} @flash = nil @shelled = @asking = false + @in_x = ENV["TERM"] =~ /(xterm|rxvt|screen)/ self.class.i_am_the_instance self end -- William From patroclo7@gmail.com Wed Jan 9 19:39:10 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Thu, 10 Jan 2008 01:39:10 +0100 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1199901555-sup-2661@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> Message-ID: <1199925510-sup-7503@clarabella.clarabella> > I just committed the following terrible patch to next, which should > properly find everyone's locale, if they have a locale. Mac users, I'd > love to know if this actually works for you. I am not a mac user, but it works fine for me! Giorgio From wmorgan-sup@masanjin.net Thu Jan 10 01:34:03 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 09 Jan 2008 22:34:03 -0800 Subject: [sup-talk] New User Questions In-Reply-To: <29393-78803@sneakemail.com> References: <29393-78803@sneakemail.com> Message-ID: <1199944172-sup-660@south> Excerpts from Guarded Identity's message of Tue Jan 08 19:39:18 -0800 2008: > I know Sup has room for more features and functionality, but it my > mind, it's no where near sucking, especially with the option of using > sup-console or Ruby scripts using Redwood libraries. Thanks! Always nice to hear. > 1. Can sent mail only be stored in an mbox, or are other formats > supported? Right now it's mbox only. There's no technical reason it couldn't be stored in a Maildir, it's just that writing to an mbox is just the easiest possible thing in the world. > 2. Will migration of maildir mail from new/ to cur/ necessitate an > execution of sup-sync? Hm. I don't think so. As long as the mtime and size of the file are preserved (which I believe they are during a move) you should be ok. > 3. If the filename of maildir mail changes, is a sup-sync required? No, for the same reason. > If 2. or 3. are indeed problems, maybe I could front the maildir > sources with an IMAP server. I had done this before, actually, but I > noticed that Sup indexing was slowed down quite a bit (rss2email and > mailing lists generate a lot of new mail). If that's true, then it must be due to IMAP transmission costs. I'm certainly willing to believe that pulling a message from IMAP is significantly slower than a disk read. > 4. How far away is sup-sync-back support for maildirs or IMAP? Is the > work straight-forward or are there some technical kinks to be ironed > out? The actual interactions with the sources themselves should be pretty easy, because they both support deleting individual messages directly. Mbox was actually the hard one, because you have to rewrite the entire file to delete messages. But ideally sup-sync-back would be source type agnostic, so there's some work to be done in terms of adding deletability to the source API in such a manner that it handles both the mbox case and the not-mbox case. (Mbox deletions need to happen in one go, whereas not-mbox deletions can happen one at a time.) > 5. Should I consider using mboxes for any reason beyond support by > sup-sync-back? No. Mbox are a terrible, evil format that just happens to be well-supported by Sup. > Also, I would really like to have time-based auto-expiry (excluding > starred or special-labeled items) for some of my mail (primarily > mailing lists and rss feeds). With mboxes, I guess I could do some > "deleted"-labeling with a Ruby script followed by a call to > sup-sync-back. That sounds like the right approach. > 6. What are my scripting options for mail expiry with Maildirs? The > search to get the message objects is pretty straight forward. How > much further work is it to delete the message from the index and to > get a filename of the message to delete from the maildir? Trivial, although the filename/IMAP id require minor API changes to expose those functions. But with a working sup-sync-back that applies to all source types, you won't have to do anything other than inject :deleted labels everywhere and simply call sup-sync-back. > 7. Any proposal for easily opening urls from messages? > > urlview is already coded up, so I'm all for a mechanism for piping > messages into an external application. But this leads to other design > issues, I think, like how to enable user-level key bindings. I'm not familiar with urlview. If it is a console-based interactive program, it should be possible to just spawn it via the hooks. We may have to add a hook, depending on the exact usage case here. > 8. I'm a little confused about threading interacts with labeling in > Sup. Labels are applied to entire threads, but it seems that labels > are stored on a per-mail basis. Correct. But you never really get to play directly with message-level labels in Sup, except for a few little things like starring and unread status, which can be applied per message in thread-view-mode. > Is seems possible for message within a thread to have different > labels, say by using a before-add-message.rb hook. Is the label set > for the thread a union of all the labels of its constituents? Correct. > 9. If a new message comes into a thread, is it auto-labeled with the > labels of the thread? No. > 10. I tried to do some auto-archiving with the before-add-message.rb > hook using message.remove_label("inbox"), but it didn't work. Is this > possible? Or is auto-archiving only possible at the source level? That should work. If you post your hook we can take a crack at debugging. > 11. Is it possible to search for mail that has no labels without > saying "!label:label1 AND !label:label2 AND ..."? > > I looked a little in the Ferret documentation, but didn't find a way. > I was trying to do this to get at some mail I archived accidentally > before applying labels. Interesting question. I don't know of a better way. If there were one it would be in the Ferret documentation. I suppose you could use DeMorgan's law to save yourself a few characters though. :) -- William From ingmar.stdin@gmail.com Thu Jan 10 02:05:40 2008 From: ingmar.stdin@gmail.com (Ingmar Vanhassel) Date: Thu, 10 Jan 2008 08:05:40 +0100 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199905135-sup-2008@south> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> <1199791609-sup-7134@clarabella.clarabella> <1199806348-sup-6626@south> <1199809040-sup-2026@clarabella.clarabella> <1199810397-sup-8123@south> <1199812350-sup-1695@south> <1199813518-sup-5839@clarabella.clarabella> <1199905135-sup-2008@south> Message-ID: <1199948145-sup-5723@indigo> Excerpts from William Morgan's message of Wed Jan 09 20:02:47 +0100 2008: > That was my setup too. Weird that I no longer seem to have this problem. > > I've committed the following patch to next, which explicitly versions > bin/sup and lib/sup.rb and compares the two upon startup. Hopefully this > should detect this type of situation. For those of you who like to play > with sup via "rake gem", gems built from your checkout will have version > 999. (This was a suggestion Ian Taylor made a long time ago.) Hi, That is a good idea imho, I have been doing something similar here. Currently `rake gem` fails here though with the following error: (using ruby-1.8.6_p111 & rake-0.7.3.) ingmar at indigo /var/temp/portage/net-mail/sup-9999/work $ rake gem (in /home/temp/portage/net-mail/sup-9999/work) [Thu Jan 10 07:48:47 +0100 2008] using character set encoding "UTF-8" rake aborted! can't convert Fixnum into String /home/temp/portage/net-mail/sup-9999/work/Rakefile:15:in `new' Thank you From marcus-sup@bar-coded.net Thu Jan 10 06:37:45 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Thu, 10 Jan 2008 11:37:45 +0000 Subject: [sup-talk] interface blinking and corrupted on the console In-Reply-To: <1199919253-sup-9556@south> References: <1199537691-sup-493@clarabella.clarabella> <1199557847-sup-5728@south> <1199563333-sup-1769@tomsk> <1199894905-sup-3585@south> <1199912893-sup-5782@tomsk> <1199919253-sup-9556@south> Message-ID: <1199965039-sup-1853@tomsk> On 9.1.2008, William Morgan wrote: > Whoops, I did something silly. Try it now. I just applied: Fixed. Thanks. From wmorgan-sup@masanjin.net Thu Jan 10 11:22:03 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 10 Jan 2008 08:22:03 -0800 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199948145-sup-5723@indigo> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> <1199791609-sup-7134@clarabella.clarabella> <1199806348-sup-6626@south> <1199809040-sup-2026@clarabella.clarabella> <1199810397-sup-8123@south> <1199812350-sup-1695@south> <1199813518-sup-5839@clarabella.clarabella> <1199905135-sup-2008@south> <1199948145-sup-5723@indigo> Message-ID: <1199982010-sup-5502@south> Excerpts from Ingmar Vanhassel's message of Wed Jan 09 23:05:40 -0800 2008: > ingmar at indigo /var/temp/portage/net-mail/sup-9999/work $ rake gem > (in /home/temp/portage/net-mail/sup-9999/work) > [Thu Jan 10 07:48:47 +0100 2008] using character set encoding "UTF-8" > rake aborted! > can't convert Fixnum into String > /home/temp/portage/net-mail/sup-9999/work/Rakefile:15:in `new' Well Rake helpfully omits the backtrace, and I can think of a very easy way to convert a fixnum into a string, but I'm guessing this is a problem with an earlier version of RubyGems than I have. Does this patch help? diff --git a/Rakefile b/Rakefile index 33e9883..69f0b68 100644 --- a/Rakefile +++ b/Rakefile @@ -10,7 +10,7 @@ end # thanks to "Mike H" ## allow people who use development versions by running "rake gem" ## and installing the resulting gem it to be able to do this. (gem ## versions must be in dotted-digit notation only). -version = Redwood::VERSION == "git" ? 999 : Redwood::VERSION +version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION Hoe.new('sup', version) do |p| p.rubyforge_name = 'sup' -- William From ingmar.stdin@gmail.com Thu Jan 10 12:23:35 2008 From: ingmar.stdin@gmail.com (Ingmar Vanhassel) Date: Thu, 10 Jan 2008 18:23:35 +0100 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199982010-sup-5502@south> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> <1199791609-sup-7134@clarabella.clarabella> <1199806348-sup-6626@south> <1199809040-sup-2026@clarabella.clarabella> <1199810397-sup-8123@south> <1199812350-sup-1695@south> <1199813518-sup-5839@clarabella.clarabella> <1199905135-sup-2008@south> <1199948145-sup-5723@indigo> <1199982010-sup-5502@south> Message-ID: <1199985758-sup-6668@indigo> Excerpts from William Morgan's message of Thu Jan 10 17:22:03 +0100 2008: > Excerpts from Ingmar Vanhassel's message of Wed Jan 09 23:05:40 -0800 2008: > > ingmar at indigo /var/temp/portage/net-mail/sup-9999/work $ rake gem > > (in /home/temp/portage/net-mail/sup-9999/work) > > [Thu Jan 10 07:48:47 +0100 2008] using character set encoding "UTF-8" > > rake aborted! > > can't convert Fixnum into String > > /home/temp/portage/net-mail/sup-9999/work/Rakefile:15:in `new' > > Well Rake helpfully omits the backtrace, and I can think of a very easy > way to convert a fixnum into a string, but I'm guessing this is a > problem with an earlier version of RubyGems than I have. I have rubygems-0.9.4-r2. > Does this patch help? It does, thanks! > diff --git a/Rakefile b/Rakefile > index 33e9883..69f0b68 100644 > --- a/Rakefile > +++ b/Rakefile > @@ -10,7 +10,7 @@ end # thanks to "Mike H" > ## allow people who use development versions by running "rake gem" > ## and installing the resulting gem it to be able to do this. (gem > ## versions must be in dotted-digit notation only). > -version = Redwood::VERSION == "git" ? 999 : Redwood::VERSION > +version = Redwood::VERSION == "git" ? "999" : Redwood::VERSION > > Hoe.new('sup', version) do |p| > p.rubyforge_name = 'sup' > From wmorgan-sup@masanjin.net Thu Jan 10 12:45:50 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 10 Jan 2008 09:45:50 -0800 Subject: [sup-talk] backspace and delete keys In-Reply-To: <1199985758-sup-6668@indigo> References: <1199746454-sup-5936@clarabella.clarabella> <1199750582-sup-5731@south> <1199751709-sup-9184@clarabella.clarabella> <1199762547-sup-3379@clarabella.clarabella> <1199774271-sup-9832@south> <1199791609-sup-7134@clarabella.clarabella> <1199806348-sup-6626@south> <1199809040-sup-2026@clarabella.clarabella> <1199810397-sup-8123@south> <1199812350-sup-1695@south> <1199813518-sup-5839@clarabella.clarabella> <1199905135-sup-2008@south> <1199948145-sup-5723@indigo> <1199982010-sup-5502@south> <1199985758-sup-6668@indigo> Message-ID: <1199987116-sup-9006@south> Excerpts from Ingmar Vanhassel's message of Thu Jan 10 09:23:35 -0800 2008: > I have rubygems-0.9.4-r2. Ok, 1.0.1 here, so that's probably the difference. > > Does this patch help? > > It does, thanks! Applied to next. -- William From marcus-sup@bar-coded.net Fri Jan 11 06:09:12 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Fri, 11 Jan 2008 11:09:12 +0000 Subject: [sup-talk] [PATCH] Fix for some warnings Message-ID: <1200049520-sup-6114@tomsk> This patch fixes a couple of warnings in message and message-chunks. The first is because a log message uses the from address before it is assigned, the second is because @lines is uninitialised in some cases (a sourceforge message in my case that didnt have any text content) This stops the console getting filled with warnings on spam. Marcus -------------- next part -------------- A non-text attachment was scrubbed... Name: warnings-patch Type: application/octet-stream Size: 1668 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080111/07581dd7/attachment.obj From marcus-sup@bar-coded.net Fri Jan 11 12:20:58 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Fri, 11 Jan 2008 17:20:58 +0000 Subject: [sup-talk] [PATCH] (Double/guarded) keypress to show all threads Message-ID: <1200071751-sup-5552@tomsk> Hi - This patch adds a multi key combination to expand the thread index view to all available threads. Note that this could return _a lot_ of threads, which is why I've used a double keypress '!!' as a guard to accidental usage. Its useful in conjunction with the tag all and apply to all commands though. So you may search for some term, by default you will get a limited number of threads back. Hitting ! twice allows you to expand the search to all available results. It will be slow if you've got a large number of search results. Marcus -------------- next part -------------- A non-text attachment was scrubbed... Name: load-all-threads Type: application/octet-stream Size: 2164 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080111/65f63fe8/attachment-0001.obj From wmorgan-sup@masanjin.net Sat Jan 12 21:22:58 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 12 Jan 2008 18:22:58 -0800 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1199925510-sup-7503@clarabella.clarabella> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> Message-ID: <1200190710-sup-6881@south> Excerpts from Giorgio Lando's message of Wed Jan 09 16:39:10 -0800 2008: > I am not a mac user, but it works fine for me! I think I've found a better way, although it introduces yet another dependency, to the 'gettext' gem. I'd be interested to see if this works for you, Giorgio, and also for anyone who's running Sup under Cygwin or OS X. This is an approach I feel a lot better about. diff --git a/Rakefile b/Rakefile index 2f2b992..d4060c1 100644 --- a/Rakefile +++ b/Rakefile @@ -17,7 +17,7 @@ Hoe.new('sup', Redwood::VERSION) do |p| p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[2].gsub(/^\s+/, "") p.changes = p.paragraphs_of('History.txt', 0..0).join("\n\n") p.email = "wmorgan-sup at masanjin.net" - p.extra_deps = [['ferret', '>= 0.10.13'], ['ncurses', '>= 0.9.1'], ['rmail', '>= 0.17'], 'highline', 'net-ssh', ['trollop', '>= 1.7'], 'lockfile', 'mime-types'] + p.extra_deps = [['ferret', '>= 0.10.13'], ['ncurses', '>= 0.9.1'], ['rmail', '>= 0.17'], 'highline', 'net-ssh', ['trollop', '>= 1.7'], 'lockfile', 'mime-types', 'gettext'] end rule 'ss?.png' => 'ss?-small.png' do |t| diff --git a/lib/sup.rb b/lib/sup.rb index 5bb27ba..064e0af 100644 --- a/lib/sup.rb +++ b/lib/sup.rb @@ -3,6 +3,7 @@ require 'yaml' require 'zlib' require 'thread' require 'fileutils' +require 'gettext' require 'curses' class Object @@ -225,9 +226,8 @@ module Redwood module_function :log end -## determine encoding and character set. there MUST be a better way to -## do this. - $encoding = `locale -c LC_CTYPE|head -6|tail -1`.chomp +## determine encoding and character set + $encoding = Locale.current.charset if $encoding Redwood::log "using character set encoding #{$encoding.inspect}" else -- 1.5.4.rc2.60.gb2e62-dirty -- William From wmorgan-sup@masanjin.net Sat Jan 12 21:32:20 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 12 Jan 2008 18:32:20 -0800 Subject: [sup-talk] [PATCH] Fix for some warnings In-Reply-To: <1200049520-sup-6114@tomsk> References: <1200049520-sup-6114@tomsk> Message-ID: <1200191029-sup-8287@south> Hi Marcus, > returning("sup-faked-" + Digest::MD5.hexdigest(raw_header)) do |id| > - Redwood::log "faking message-id for message from #@from: #{id}" > + fakeid = id > end In this case, we can just assign the result directly to fakeid rather than using the k-combinator (aka "returning"). Also there was a bit of extraneous whitespace introduced at the end of one line in that patch, which became obvious when I did a git diff --color. Can you try using git-format-patch to send the patch? It will create a nice email out of a commit for you, which I can then apply without too much effort. (Or if you're feeling courageous, use git-send-email, which will also do the emailing for you.) I'm going to add a page to the wiki with an overview of git, branching, and submitting patches. -- William From wmorgan-sup@masanjin.net Sat Jan 12 22:32:04 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 12 Jan 2008 19:32:04 -0800 Subject: [sup-talk] [PATCH] Fix for some warnings In-Reply-To: <1200191029-sup-8287@south> References: <1200049520-sup-6114@tomsk> <1200191029-sup-8287@south> Message-ID: <1200195117-sup-7883@south> Excerpts from William Morgan's message of Sat Jan 12 18:32:20 -0800 2008: > I'm going to add a page to the wiki with an overview of git, > branching, and submitting patches. http://sup.rubyforge.org/wiki/wiki.pl?Contributing -- William From wmorgan-sup@masanjin.net Sun Jan 13 00:30:16 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 12 Jan 2008 21:30:16 -0800 Subject: [sup-talk] [PATCH] (Double/guarded) keypress to show all threads In-Reply-To: <1200071751-sup-5552@tomsk> References: <1200071751-sup-5552@tomsk> Message-ID: <1200201168-sup-5812@south> Excerpts from Marcus Williams's message of Fri Jan 11 09:20:58 -0800 2008: > This patch adds a multi key combination to expand the thread index > view to all available threads. Note that this could return _a lot_ of > threads, which is why I've used a double keypress '!!' as a guard to > accidental usage. Its useful in conjunction with the tag all and apply > to all commands though. This does make me a little nervous. Is the use case always that you want to apply a command to all threads for a given search? If so, I wonder if it would be better to explicitly model that, without the intermediate process of loading all the threads. If we're going to have a potentially long-running activity like this available from the UI, then I'd prefer to do it in a manner that gives the user an indication of how long until completion, the ability to abort, etc. How does gmail handle this type of thing? Or is everything so fast with gmail that it doesn't matter? -- William From wmorgan-sup@masanjin.net Sun Jan 13 01:04:16 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 12 Jan 2008 22:04:16 -0800 Subject: [sup-talk] new in next: moving between messages in thread-view-mode Message-ID: <1200204144-sup-1329@south> I've committed some slight changes in the way that 'n' and 'p' work in thread-view-mode: they now always align the current message at the top left of the screen. I think this makes them a little more handy for running through all messages in a thread, since you can keep your eyes in the same place. I've also added a 'z' command to align whatever message the cursor's on currently to the top left. Comments? -- William From patroclo7@gmail.com Sun Jan 13 08:09:02 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sun, 13 Jan 2008 14:09:02 +0100 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200190710-sup-6881@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> Message-ID: <1200229710-sup-3448@clarabella.clarabella> Excerpts from William Morgan's message of Sun Jan 13 03:22:58 +0100 2008: > > I think I've found a better way, although it introduces yet another > dependency, to the 'gettext' gem. I'd be interested to see if this works > for you, Giorgio, and also for anyone who's running Sup under Cygwin or > OS X. This is an approach I feel a lot better about. Yes, it works for me! Giorgio From patroclo7@gmail.com Sun Jan 13 08:10:16 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sun, 13 Jan 2008 14:10:16 +0100 Subject: [sup-talk] new in next: moving between messages in thread-view-mode In-Reply-To: <1200204144-sup-1329@south> References: <1200204144-sup-1329@south> Message-ID: <1200229762-sup-5238@clarabella.clarabella> Excerpts from William Morgan's message of Sun Jan 13 07:04:16 +0100 2008: > Comments? I like it a lot and I did not yet find any drawback Giorgio Lando From patroclo7@gmail.com Sun Jan 13 08:22:18 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sun, 13 Jan 2008 14:22:18 +0100 Subject: [sup-talk] little problem with the file browser Message-ID: <1200230054-sup-7242@clarabella.clarabella> Hi, I have a little problem when I browse files (for example when choosing an attachment). It happens only in some cases and in a way that seems to be random (but may be I am missing some kind of regularity). For some folders (but only sometimes for each of them) I do not get immediately a full display of the files in the folder. The display starts at the last file, and the others are displayed only if I press k to go up. At least in two cases the display started not at the last file but at an intermediate files, so that only some of the files can be immediately seen, while I had to press k to see and select the others. It does not ever happen to me with the first folder I enter (my home directory), but only when I enter some of its subfolders. I am pretty sure that they have no peculiar permissions (also because everything can be finally seen and accessed, it is enough to press k). If the description of the problem is unclear, I can provide a couple of screenshots, just ask. It happens with both git versions (and with the release) Giorgio From nicolas.pouillard@gmail.com Sun Jan 13 09:46:15 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Sun, 13 Jan 2008 15:46:15 +0100 Subject: [sup-talk] [PATCH] Avoid re-adding the signature when re-editing a draft with edit_signature: true Message-ID: <1200235575295-git-send-email-nicolas.pouillard@gmail.com> --- lib/sup/modes/edit-message-mode.rb | 2 +- lib/sup/modes/resume-mode.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb index f058d03..710d390 100644 --- a/lib/sup/modes/edit-message-mode.rb +++ b/lib/sup/modes/edit-message-mode.rb @@ -59,7 +59,7 @@ EOS @header_lines = [] @body = opts.delete(:body) || [] - @body += sig_lines if $config[:edit_signature] + @body += sig_lines if $config[:edit_signature] and not opts.delete(:have_signature) if opts[:attachments] @attachments = opts[:attachments].values diff --git a/lib/sup/modes/resume-mode.rb b/lib/sup/modes/resume-mode.rb index 3470975..b1c69fc 100644 --- a/lib/sup/modes/resume-mode.rb +++ b/lib/sup/modes/resume-mode.rb @@ -8,7 +8,7 @@ class ResumeMode < EditMessageMode header, body = parse_file m.draft_filename header.delete "Date" - super :header => header, :body => body + super :header => header, :body => body, :have_signature => true end def killable? -- 1.5.3.1.109.gacd69 From nicolas.pouillard@gmail.com Sun Jan 13 10:57:26 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Sun, 13 Jan 2008 16:57:26 +0100 Subject: [sup-talk] [PATCH] (Double/guarded) keypress to show all threads In-Reply-To: <1200201168-sup-5812@south> References: <1200071751-sup-5552@tomsk> <1200201168-sup-5812@south> Message-ID: <1200239611-sup-4801@ausone.local> Excerpts from William Morgan's message of Sun Jan 13 06:30:16 +0100 2008: > Excerpts from Marcus Williams's message of Fri Jan 11 09:20:58 -0800 2008: > > This patch adds a multi key combination to expand the thread index > > view to all available threads. Note that this could return _a lot_ of > > threads, which is why I've used a double keypress '!!' as a guard to > > accidental usage. Its useful in conjunction with the tag all and apply > > to all commands though. > > This does make me a little nervous. Is the use case always that you want > to apply a command to all threads for a given search? If so, I wonder if > it would be better to explicitly model that, without the intermediate > process of loading all the threads. > > If we're going to have a potentially long-running activity like this > available from the UI, then I'd prefer to do it in a manner that gives > the user an indication of how long until completion, the ability to > abort, etc. > > How does gmail handle this type of thing? Or is everything so fast with > gmail that it doesn't matter? By default it occurs only seen threads (25,50,100 messages depending on configuration), but you have also a check box to apply on all the search results. Then that's indeed so fast that there's no need for a progress bar. However that's fast because operations are chosen to apply fast (add or remove labels, basically). -- Nicolas Pouillard aka Ertai From marcus-sup@bar-coded.net Sun Jan 13 13:16:12 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sun, 13 Jan 2008 18:16:12 +0000 Subject: [sup-talk] [PATCH] (Double/guarded) keypress to show all threads In-Reply-To: <1200201168-sup-5812@south> References: <1200071751-sup-5552@tomsk> <1200201168-sup-5812@south> Message-ID: <1200247733-sup-3710@tomsk> On 13.1.2008, William Morgan wrote: > This does make me a little nervous. Is the use case always that you want > to apply a command to all threads for a given search? If so, I wonder if > it would be better to explicitly model that, without the intermediate > process of loading all the threads. I dont use it when I know the search will generate a lot of threads :) What I'm working on is getting it to stop searching if the user presses a key (so you get a progress of 'Found ??? threads (press ESC to stop)' or something, but no luck yet :( I guess it doesnt actually have to return the threads a la gmail (gmail lets you select all threads in search without actually displaying them but its _fast_). I tried doing this but since the majority of searches I do end up being with labels I think you actually need to thread them in order to be of any use (because not all labels are on every message in thread). I can resubmit once I figure out the interrupt. Marcus From marcus-sup@bar-coded.net Sun Jan 13 13:19:46 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sun, 13 Jan 2008 18:19:46 +0000 Subject: [sup-talk] [PATCH] Fix for some warnings In-Reply-To: <1200191029-sup-8287@south> References: <1200049520-sup-6114@tomsk> <1200191029-sup-8287@south> Message-ID: <1200248339-sup-5704@tomsk> On 13.1.2008, William Morgan wrote: > In this case, we can just assign the result directly to fakeid rather > than using the k-combinator (aka "returning"). Also there was a bit of > extraneous whitespace introduced at the end of one line in that patch, > which became obvious when I did a git diff --color. Yep, sorry sent the patch in half cocked and realised this afterwards. Will resubmit tonight sometime. MArcus From wmorgan-sup@masanjin.net Sun Jan 13 19:55:28 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 13 Jan 2008 16:55:28 -0800 Subject: [sup-talk] [PATCH] Avoid re-adding the signature when re-editing a draft with edit_signature: true In-Reply-To: <1200235575295-git-send-email-nicolas.pouillard@gmail.com> References: <1200235575295-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1200271922-sup-919@south> Hi Nicholas, Forgive me for being picky. I've just updated HACKING (on master) to add: +- and/or versus ||/&&. In Ruby, "and" and "or" bind very loosely---even + more loosely than function application. This makes them ideal for + end-of-line short-circuit control in poetry mode. So, use || and && + for ordinary logical comparisons, and "and" and "or" for end-of-line + flow control. E.g.: + x = a || b or raise "neither is true" So can you change this: > + @body += sig_lines if $config[:edit_signature] and not > opts.delete(:have_signature) To either "&& !" or to "unless". Other than that everything looks good. -- William From wmorgan-sup@masanjin.net Sun Jan 13 19:56:00 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 13 Jan 2008 16:56:00 -0800 Subject: [sup-talk] [PATCH] Avoid re-adding the signature when re-editing a draft with edit_signature: true In-Reply-To: <1200271922-sup-919@south> References: <1200235575295-git-send-email-nicolas.pouillard@gmail.com> <1200271922-sup-919@south> Message-ID: <1200272143-sup-1070@south> Excerpts from William Morgan's message of Sun Jan 13 16:55:28 -0800 2008: > Hi Nicholas, Nicolas. Sorry! -- William From wmorgan-sup@masanjin.net Sun Jan 13 20:06:37 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 13 Jan 2008 17:06:37 -0800 Subject: [sup-talk] [PATCH] (Double/guarded) keypress to show all threads In-Reply-To: <1200247733-sup-3710@tomsk> References: <1200071751-sup-5552@tomsk> <1200201168-sup-5812@south> <1200247733-sup-3710@tomsk> Message-ID: <1200272179-sup-6412@south> Excerpts from Marcus Williams's message of Sun Jan 13 10:16:12 -0800 2008: > What I'm working on is getting it to stop searching if the user > presses a key (so you get a progress of 'Found ??? threads (press ESC > to stop)' or something, but no luck yet :( Excellent, that would be great. I don't think it will be too hard: in ThreadIndexMode#load_n_threads, in the block that's passed to @ts.load_n_threads, just check to see if a boolean instance variable is true, and break if so (and reset it). That block is called after each thread is loaded, so the ThreadSet will still be in a consistent state. Then add a keypress to set that flag to true, if @load_thread is true. > I guess it doesnt actually have to return the threads a la gmail > (gmail lets you select all threads in search without actually > displaying them but its _fast_). The general slowness of this type of operation in Sup is a real problem, IMO. I think we can go a long way by caching threading information, though of course that's at the expense of disk space. -- William From wmorgan-sup@masanjin.net Sun Jan 13 20:23:25 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 13 Jan 2008 17:23:25 -0800 Subject: [sup-talk] little problem with the file browser In-Reply-To: <1200230054-sup-7242@clarabella.clarabella> References: <1200230054-sup-7242@clarabella.clarabella> Message-ID: <1200273694-sup-6854@south> Excerpts from Giorgio Lando's message of Sun Jan 13 05:22:18 -0800 2008: > Hi, I have a little problem when I browse files (for example when > choosing an attachment). It happens only in some cases and in a way > that seems to be random (but may be I am missing some kind of > regularity). Does this patch fix the problem? diff --git a/lib/sup/modes/file-browser-mode.rb b/lib/sup/modes/file-browser-mode.rb index 3c68eec..b49f3f4 100644 --- a/lib/sup/modes/file-browser-mode.rb +++ b/lib/sup/modes/file-browser-mode.rb @@ -38,6 +38,7 @@ protected def reload regen_text + jump_to_start buffer.mark_dirty end -- William From wmorgan-sup@masanjin.net Sun Jan 13 21:16:19 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 13 Jan 2008 18:16:19 -0800 Subject: [sup-talk] little problem with the file browser In-Reply-To: <704d6aa20801131801j3a5516b9teeaafbc468451fcc@mail.gmail.com> References: <1200230054-sup-7242@clarabella.clarabella> <1200273694-sup-6854@south> <704d6aa20801131801j3a5516b9teeaafbc468451fcc@mail.gmail.com> Message-ID: <1200276942-sup-1155@south> Excerpts from Giorgio Lando's message of Sun Jan 13 18:01:19 -0800 2008: > 2008/1/14, William Morgan : > > Does this patch fix the problem? > > Yes, it does solve the problem! Ok, I've pushed that patch to master. -- William From wmorgan-sup@masanjin.net Sun Jan 13 21:17:26 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sun, 13 Jan 2008 18:17:26 -0800 Subject: [sup-talk] [PATCH] Fix for some warnings In-Reply-To: <1200195117-sup-7883@south> References: <1200049520-sup-6114@tomsk> <1200191029-sup-8287@south> <1200195117-sup-7883@south> Message-ID: <1200277007-sup-616@south> Excerpts from William Morgan's message of Sat Jan 12 19:32:04 -0800 2008: > http://sup.rubyforge.org/wiki/wiki.pl?Contributing I've updated this with a bit more information on how to create a beautiful patch. Comments welcome. -- William From nicolas.pouillard@gmail.com Mon Jan 14 04:00:38 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Mon, 14 Jan 2008 10:00:38 +0100 Subject: [sup-talk] [PATCH] Avoid re-adding the signature when re-editing a draft with edit_signature: true Message-ID: <120030123886-git-send-email-nicolas.pouillard@gmail.com> --- lib/sup/modes/edit-message-mode.rb | 2 +- lib/sup/modes/resume-mode.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb index f058d03..6a7f273 100644 --- a/lib/sup/modes/edit-message-mode.rb +++ b/lib/sup/modes/edit-message-mode.rb @@ -59,7 +59,7 @@ EOS @header_lines = [] @body = opts.delete(:body) || [] - @body += sig_lines if $config[:edit_signature] + @body += sig_lines if $config[:edit_signature] && !opts.delete(:have_signature) if opts[:attachments] @attachments = opts[:attachments].values diff --git a/lib/sup/modes/resume-mode.rb b/lib/sup/modes/resume-mode.rb index 3470975..b1c69fc 100644 --- a/lib/sup/modes/resume-mode.rb +++ b/lib/sup/modes/resume-mode.rb @@ -8,7 +8,7 @@ class ResumeMode < EditMessageMode header, body = parse_file m.draft_filename header.delete "Date" - super :header => header, :body => body + super :header => header, :body => body, :have_signature => true end def killable? -- 1.5.3.1.109.gacd69 From nicolas.pouillard@gmail.com Mon Jan 14 04:01:58 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Mon, 14 Jan 2008 10:01:58 +0100 Subject: [sup-talk] [PATCH] Avoid re-adding the signature when re-editing a draft with edit_signature: true In-Reply-To: <1200271922-sup-919@south> References: <1200235575295-git-send-email-nicolas.pouillard@gmail.com> <1200271922-sup-919@south> Message-ID: <1200301275-sup-5169@ausone.local> Excerpts from William Morgan's message of Mon Jan 14 01:55:28 +0100 2008: > Hi Nicholas, Hi, > Forgive me for being picky. I've just updated HACKING (on master) to > add: > > +- and/or versus ||/&&. In Ruby, "and" and "or" bind very loosely---even > + more loosely than function application. This makes them ideal for > + end-of-line short-circuit control in poetry mode. So, use || and && > + for ordinary logical comparisons, and "and" and "or" for end-of-line > + flow control. E.g.: > + x = a || b or raise "neither is true" > > So can you change this: > > > + @body += sig_lines if $config[:edit_signature] and not > > opts.delete(:have_signature) > > To either "&& !" or to "unless". Done. > Other than that everything looks good. Thanks. -- Nicolas Pouillard aka Ertai From marcus-sup@bar-coded.net Mon Jan 14 05:54:26 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Mon, 14 Jan 2008 10:54:26 +0000 Subject: [sup-talk] [PATCH] (Double/guarded) keypress to show all threads In-Reply-To: <1200272179-sup-6412@south> References: <1200071751-sup-5552@tomsk> <1200201168-sup-5812@south> <1200247733-sup-3710@tomsk> <1200272179-sup-6412@south> Message-ID: <1200307947-sup-1357@tomsk> On 14.1.2008, William Morgan wrote: > The general slowness of this type of operation in Sup is a real > problem, IMO. I think we can go a long way by caching threading > information, though of course that's at the expense of disk space. Disk space is cheap :) So if this gets us a speed up I think its worth it. If people are worried about that sort of thing it could be a configurable option. Marcus From marcus-sup@bar-coded.net Mon Jan 14 07:24:27 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Mon, 14 Jan 2008 12:24:27 +0000 Subject: [sup-talk] [PATCH] Added quoteline hook. This allows you to specify how the text above the quoted email should look (Normally 'Excerpts froms...') Message-ID: <1200313448-sup-3169@tomsk> --- 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 04018e3..59ffa66 100644 --- a/lib/sup/modes/reply-mode.rb +++ b/lib/sup/modes/reply-mode.rb @@ -9,6 +9,14 @@ class ReplyMode < EditMessageMode :list => "Mailing list", :user => "Customized" } + + HookManager.register "quoteline", < #{l}" } + quoteline = HookManager.run("quoteline", :message => m) || default_quoteline(m) + lines = [quoteline] + m.quotable_body_lines.map { |l| "> #{l}" } lines.pop while lines.last =~ /^\s*$/ lines end + def default_quoteline m + "Excerpts from #{@m.from.name}'s message of #{@m.date}:" + end + def handle_new_text new_header, new_body old_header = @headers[@type_selector.val] if new_header.size != old_header.size || old_header.any? { |k, v| new_header[k] != v } -- 1.5.3.7 From wmorgan-sup@masanjin.net Mon Jan 14 23:49:35 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 14 Jan 2008 20:49:35 -0800 Subject: [sup-talk] [PATCH] (Double/guarded) keypress to show all threads In-Reply-To: <1200307947-sup-1357@tomsk> References: <1200071751-sup-5552@tomsk> <1200201168-sup-5812@south> <1200247733-sup-3710@tomsk> <1200272179-sup-6412@south> <1200307947-sup-1357@tomsk> Message-ID: <1200372469-sup-1813@south> Excerpts from Marcus Williams's message of Mon Jan 14 02:54:26 -0800 2008: > Disk space is cheap :) So if this gets us a speed up I think its worth > it. If people are worried about that sort of thing it could be a > configurable option. I agree. I don't think it will be terribly hard to do, either, but I should probably do some real profiling before just diving in. -- William From wmorgan-sup@masanjin.net Tue Jan 15 00:05:58 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 14 Jan 2008 21:05:58 -0800 Subject: [sup-talk] [PATCH] Avoid re-adding the signature when re-editing a draft with edit_signature: true In-Reply-To: <120030123886-git-send-email-nicolas.pouillard@gmail.com> References: <120030123886-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1200373546-sup-7983@south> Applied straight to master. Thanks! -- William From wmorgan-sup@masanjin.net Tue Jan 15 00:20:17 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 14 Jan 2008 21:20:17 -0800 Subject: [sup-talk] [PATCH] Added quoteline hook. This allows you to specify how the text above the quoted email should look (Normally 'Excerpts froms...') In-Reply-To: <1200313448-sup-3169@tomsk> References: <1200313448-sup-3169@tomsk> Message-ID: <1200374341-sup-8557@south> Hi Marcus, Two small comments: First, can you please use the Official Commit Log Entry Format(tm) as detailed on the wiki, so that all the git tools that rely on that function nicely? Second: Excerpts from Marcus Williams's message of Mon Jan 14 04:24:27 -0800 2008: > + lines = [quoteline] + m.quotable_body_lines.map { |l| "> #{l}" } Can we instead do quoteline.split("\n"), so that people can return multi-line things? Not that I endore that practice, but, de gustibus and all that. Other than that looks good. -- William From marcus-sup@bar-coded.net Tue Jan 15 04:18:28 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Tue, 15 Jan 2008 09:18:28 +0000 Subject: [sup-talk] [PATCH] Added quoteline hook. This allows you to specify how the text above the quoted email should look (Normally 'Excerpts froms...') In-Reply-To: <1200374341-sup-8557@south> References: <1200313448-sup-3169@tomsk> <1200374341-sup-8557@south> Message-ID: <1200388608-sup-6945@tomsk> On 15.1.2008, William Morgan wrote: > First, can you please use the Official Commit Log Entry Format(tm) as > detailed on the wiki, so that all the git tools that rely on that > function nicely? Sorry missed that - I did try to get git to do something like that but couldnt figure out how to bend it the way I wanted. Will revert and resend. > Excerpts from Marcus Williams's message of Mon Jan 14 04:24:27 -0800 2008: > > + lines = [quoteline] + m.quotable_body_lines.map { |l| "> #{l}" } > > Can we instead do quoteline.split("\n"), so that people can return > multi-line things? Not that I endore that practice, but, de gustibus and > all that. No problems (multi-line quote lines... bleurgh) Marcus From marcus-sup@bar-coded.net Tue Jan 15 04:40:04 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Tue, 15 Jan 2008 09:40:04 +0000 Subject: [sup-talk] [PATCH] Added quoteline hook for reply mode In-Reply-To: <1200388608-sup-6945@tomsk> References: <1200313448-sup-3169@tomsk> <1200374341-sup-8557@south> <1200388608-sup-6945@tomsk> Message-ID: <1200389942-sup-6442@tomsk> This hook allows a user to configure a quote line for replies. The default is the standard sup quote line "Excerpts from...". Multiple lines are allowed. --- 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 04018e3..9c4b11d 100644 --- a/lib/sup/modes/reply-mode.rb +++ b/lib/sup/modes/reply-mode.rb @@ -9,6 +9,14 @@ class ReplyMode < EditMessageMode :list => "Mailing list", :user => "Customized" } + + HookManager.register "quoteline", < #{l}" } + quoteline = HookManager.run("quoteline", :message => m) || default_quoteline(m) + lines = quoteline.split("\n") + m.quotable_body_lines.map { |l| "> #{l}" } lines.pop while lines.last =~ /^\s*$/ lines end + def default_quoteline m + "Excerpts from #{@m.from.name}'s message of #{@m.date}:" + end + def handle_new_text new_header, new_body old_header = @headers[@type_selector.val] if new_header.size != old_header.size || old_header.any? { |k, v| new_header[k] != v } -- 1.5.3.7 From marcus-sup@bar-coded.net Tue Jan 15 07:29:57 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Tue, 15 Jan 2008 12:29:57 +0000 Subject: [sup-talk] [PATCH] Search all threads with option to cancel In-Reply-To: <1200372469-sup-1813@south> References: <1200071751-sup-5552@tomsk> <1200201168-sup-5812@south> <1200247733-sup-3710@tomsk> <1200272179-sup-6412@south> <1200307947-sup-1357@tomsk> <1200372469-sup-1813@south> Message-ID: <1200400125-sup-5900@tomsk> This adds the ability to extend your search to display all threads (which may take a _long_ time) instead of the standard maximum (usually screen height). It is accessed via a multi-key action !C in thread index modes. To cancel the search the user can press another multi-key action !S --- lib/sup/modes/thread-index-mode.rb | 40 +++++++++++++++++++++++++++++++---- lib/sup/thread.rb | 2 +- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 0d90be4..f86a5a4 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -16,6 +16,10 @@ EOS register_keymap do |k| k.add :load_threads, "Load #{LOAD_MORE_THREAD_NUM} more threads", 'M' + k.add_multi "Search all threads - (C)onfirm, or (S)top current search :", '!' do |kk| + kk.add :load_all_threads, "Load all threads (may list a _lot_ of threads)", 'C' + kk.add :break_search, "Stop current search", 'S' + end k.add :reload, "Refresh view", '@' k.add :toggle_archived, "Toggle archived status", 'a' k.add :toggle_starred, "Star or unstar all messages in thread", '*' @@ -49,6 +53,8 @@ EOS @load_thread_opts = load_thread_opts @hidden_labels = hidden_labels + LabelManager::HIDDEN_RESERVED_LABELS @date_width = DATE_WIDTH + + @interrupt_search = false initialize_threads # defines @ts and @ts_mutex update # defines @text and @lines @@ -444,15 +450,20 @@ EOS ## TODO: figure out @ts_mutex in this method def load_n_threads n=LOAD_MORE_THREAD_NUM, opts={} @mbid = BufferManager.say "Searching for threads..." + + ts_to_load = n + ts_to_load = ts_to_load + @ts.size unless n == -1 # -1 means all threads + orig_size = @ts.size last_update = Time.now - @ts.load_n_threads(@ts.size + n, opts) do |i| + @ts.load_n_threads(ts_to_load, opts) do |i| if (Time.now - last_update) >= 0.25 - BufferManager.say "Loaded #{i.pluralize 'thread'}...", @mbid + BufferManager.say "Loaded #{i.pluralize 'thread'} (use !S to cancel search)...", @mbid update BufferManager.draw_screen last_update = Time.now end + break if @interrupt_search end @ts.threads.each { |th| th.labels.each { |l| LabelManager << l } } @@ -472,13 +483,32 @@ EOS end end - def load_threads opts={} - n = opts[:num] || ThreadIndexMode::LOAD_MORE_THREAD_NUM + def break_search + @interrupt_search = true + end + def load_all_threads + load_threads :num => -1 + end + + def load_threads opts={} + if opts[:num].nil? + n = ThreadIndexMode::LOAD_MORE_THREAD_NUM + else + n = opts[:num] + end + myopts = @load_thread_opts.merge({ :when_done => (lambda do |num| opts[:when_done].call(num) if opts[:when_done] + + cancelled = "" + if @interrupt_search + cancelled = " (search cancelled by user)" + @interrupt_search = false + end + if num > 0 - BufferManager.flash "Found #{num.pluralize 'thread'}." + BufferManager.flash "Found #{num.pluralize 'thread'}#{cancelled}." else BufferManager.flash "No matches." end diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb index 83f0db7..5b0a300 100644 --- a/lib/sup/thread.rb +++ b/lib/sup/thread.rb @@ -324,7 +324,7 @@ class ThreadSet ## load in (at most) num number of threads from the index def load_n_threads num, opts={} @index.each_id_by_date opts do |mid, builder| - break if size >= num + break if size >= num unless num == -1 next if contains_id? mid m = builder.call -- 1.5.3.7 From patroclo7@gmail.com Tue Jan 15 07:54:44 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Tue, 15 Jan 2008 13:54:44 +0100 Subject: [sup-talk] header cache Message-ID: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> Hi, after ten days of successful use of sup. I would like to say that it is very useful in many circumstances (I have tried maildir, mbox, IMAP folders, and a mix of them). When using it with gmail imap, the only thing I lack is the header cache. In fact, I access directly the "All mail" folder (since anything else in gmail is actually a duplicate of the mails in All mail; moreover in this way any change by sup does not interfere with the archiviation from the gmail web interface, and the archiviation from the web interface does not prevent sup from seeing the message). My "All mail" includes approximately 40000 messages so the fetching of IMAP headers is highly time-consuming (also the initial sup-sync took about 8 hours, but this happens only one time). I see that in TODO the header cache is scheduled for the 0.4 release. So am I correct to expect it quite soon? Thanks in advance for any info Giorgio Lando From marcus-sup@bar-coded.net Tue Jan 15 09:02:27 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Tue, 15 Jan 2008 14:02:27 +0000 Subject: [sup-talk] [PATCH] Fix for some warnings on faked addresses and ids In-Reply-To: <1200248339-sup-5704@tomsk> References: <1200049520-sup-6114@tomsk> <1200191029-sup-8287@south> <1200248339-sup-5704@tomsk> Message-ID: <1200405667-sup-9034@tomsk> Fixes a few unitialised variable warnings when logging faked message addresses or faked message ids. Also initialises the @lines var when the message is not text. --- lib/sup/message-chunks.rb | 1 + lib/sup/message.rb | 17 ++++++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index 2fcf8f9..08dcf27 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -82,6 +82,7 @@ EOS :sibling_types => sibling_types end + @lines = nil if text @lines = text.gsub("\r\n", "\n").gsub(/\t/, " ").gsub(/\r/, "").split("\n") @quotable = true diff --git a/lib/sup/message.rb b/lib/sup/message.rb index 65aebd5..bd37162 100644 --- a/lib/sup/message.rb +++ b/lib/sup/message.rb @@ -60,25 +60,28 @@ class Message def parse_header header header.each { |k, v| header[k.downcase] = v } - + + fakeid = nil + fakename = nil + @id = if header["message-id"] sanitize_message_id header["message-id"] else - returning("sup-faked-" + Digest::MD5.hexdigest(raw_header)) do |id| - Redwood::log "faking message-id for message from #@from: #{id}" - end + fakeid = "sup-faked-" + Digest::MD5.hexdigest(raw_header) end @from = if header["from"] PersonManager.person_for header["from"] else - name = "Sup Auto-generated Fake Sender " - Redwood::log "faking from for message #@id: #{name}" - PersonManager.person_for name + fakename = "Sup Auto-generated Fake Sender " + PersonManager.person_for fakename end + Redwood::log "faking message-id for message from #@from: #{id}" if fakeid + Redwood::log "faking from for message #@id: #{fakename}" if fakename + date = header["date"] @date = case date -- 1.5.3.7 From grant@antiflux.org Tue Jan 15 11:30:04 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Tue, 15 Jan 2008 11:30:04 -0500 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200190710-sup-6881@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> Message-ID: <1200414495-sup-4477@spooky.local> Excerpts from William Morgan's message of Sat Jan 12 21:22:58 -0500 2008: > I think I've found a better way, although it introduces yet another > dependency, to the 'gettext' gem. I'd be interested to see if this works > for you, Giorgio, and also for anyone who's running Sup under Cygwin or > OS X. This is an approach I feel a lot better about. This works on OS X (10.5.1). Your other method of using locale(1) didn't. ('locale -c LC_CTYPE' returns 'LC_CTYPE' on my machine... not very useful.) From grant@antiflux.org Tue Jan 15 11:34:48 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Tue, 15 Jan 2008 11:34:48 -0500 Subject: [sup-talk] mailcap for os x In-Reply-To: <1198781360-sup-2193@south> References: <1196351498-sup-4803@spooky.local> <1198781360-sup-2193@south> Message-ID: <1200414674-sup-1175@spooky.local> Excerpts from William Morgan's message of Thu Dec 27 13:50:26 -0500 2007: > I'd willingly accept a patch to hook into Attachment#view! and allow > overriding of the default run-mailcap behavior. Sure, but I don't know of the best way to do that. It wouldn't be like other hooks, because it has to replace behaviour and not just supplement it. Lots of systems don't have run-mailcap(1). Probably we should port it and push it out as a gem that Sup depends on. From wmorgan-sup@masanjin.net Tue Jan 15 20:31:33 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 17:31:33 -0800 Subject: [sup-talk] [PATCH] Added quoteline hook for reply mode In-Reply-To: <1200389942-sup-6442@tomsk> References: <1200313448-sup-3169@tomsk> <1200374341-sup-8557@south> <1200388608-sup-6945@tomsk> <1200389942-sup-6442@tomsk> Message-ID: <1200447083-sup-7802@south> Reformatted excerpts from Marcus Williams's message of 2008-01-15: > This hook allows a user to configure a quote line for replies. The > default is the standard sup quote line "Excerpts from...". Multiple > lines are allowed. Applied to next. Thanks! -- William From wmorgan-sup@masanjin.net Tue Jan 15 20:32:31 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 17:32:31 -0800 Subject: [sup-talk] [PATCH] Fix for some warnings on faked addresses and ids In-Reply-To: <1200405667-sup-9034@tomsk> References: <1200049520-sup-6114@tomsk> <1200191029-sup-8287@south> <1200248339-sup-5704@tomsk> <1200405667-sup-9034@tomsk> Message-ID: <1200447103-sup-1512@south> Reformatted excerpts from Marcus Williams's message of 2008-01-15: > Fixes a few unitialised variable warnings when logging faked message > addresses or faked message ids. Also initialises the @lines var when > the message is not text. Applied to next. I think it's probably safe enough for master but I wanted to give those of you who get such poorly-behaved email a chance to test it out. -- William From wmorgan-sup@masanjin.net Tue Jan 15 20:45:14 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 17:45:14 -0800 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200414495-sup-4477@spooky.local> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> Message-ID: <1200447310-sup-8536@south> Reformatted excerpts from Grant Hollingworth's message of 2008-01-15: > Excerpts from William Morgan's message of Sat Jan 12 21:22:58 -0500 2008: > > I think I've found a better way, although it introduces yet another > > dependency, to the 'gettext' gem. I'd be interested to see if this > > works for you, Giorgio, and also for anyone who's running Sup under > > Cygwin or OS X. This is an approach I feel a lot better about. > > This works on OS X (10.5.1). Your other method of using locale(1) > didn't. ('locale -c LC_CTYPE' returns 'LC_CTYPE' on my machine... not > very useful.) Exactly what I was hoping to hear. I'll merge those changes down to master, then. BTW, your past few messages have been using charset=LC_CTYPE, which the mailing list ever-so-helpfully wraps in a nasty MIME attachment. So you should switch back to the functioning version. :) -- William From nicolas.pouillard@gmail.com Tue Jan 15 21:20:02 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Wed, 16 Jan 2008 03:20:02 +0100 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200447310-sup-8536@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> <1200447310-sup-8536@south> Message-ID: <1200449354-sup-9441@ausone.local> Excerpts from William Morgan's message of Wed Jan 16 02:45:14 +0100 2008: > Reformatted excerpts from Grant Hollingworth's message of 2008-01-15: > > Excerpts from William Morgan's message of Sat Jan 12 21:22:58 -0500 2008: > > > I think I've found a better way, although it introduces yet another > > > dependency, to the 'gettext' gem. I'd be interested to see if this > > > works for you, Giorgio, and also for anyone who's running Sup under > > > Cygwin or OS X. This is an approach I feel a lot better about. > > > > This works on OS X (10.5.1). Your other method of using locale(1) > > didn't. ('locale -c LC_CTYPE' returns 'LC_CTYPE' on my machine... not > > very useful.) > > Exactly what I was hoping to hear. I'll merge those changes down to > master, then. > > BTW, your past few messages have been using charset=LC_CTYPE, which the > mailing list ever-so-helpfully wraps in a nasty MIME attachment. So you > should switch back to the functioning version. :) Yuck! I got this virus too :) And I don't see your gettext patch neither on master nor on next ;( -- Nicolas Pouillard aka Ertai From wmorgan-sup@masanjin.net Tue Jan 15 21:57:00 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 18:57:00 -0800 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200449354-sup-9441@ausone.local> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> <1200447310-sup-8536@south> <1200449354-sup-9441@ausone.local> Message-ID: <1200452148-sup-9276@south> Reformatted excerpts from nicolas.pouillard's message of 2008-01-15: > And I don't see your gettext patch neither on master nor on next ;( Whoops, I had never merged it onto next in the first place. Well, it's on master now. Let me know if it gives you any trouble. -- William From wmorgan-sup@masanjin.net Tue Jan 15 22:09:48 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 19:09:48 -0800 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200452148-sup-9276@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> <1200447310-sup-8536@south> <1200449354-sup-9441@ausone.local> <1200452148-sup-9276@south> Message-ID: <1200452938-sup-9442@south> Reformatted excerpts from William Morgan's message of 2008-01-15: > Reformatted excerpts from nicolas.pouillard's message of 2008-01-15: > > And I don't see your gettext patch neither on master nor on next ;( > > Whoops, I had never merged it onto next in the first place. Well, it's > on master now. Let me know if it gives you any trouble. Aaaand merged onto next. I do seem to spend a lot of my time merging from master to next. I wonder if that's proper git usage. Seems to clutter up my pretty gitk graph. -- William From nicolas.pouillard@gmail.com Tue Jan 15 22:14:10 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Wed, 16 Jan 2008 04:14:10 +0100 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200452148-sup-9276@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> <1200447310-sup-8536@south> <1200449354-sup-9441@ausone.local> <1200452148-sup-9276@south> Message-ID: <1200453166-sup-9993@ausone.local> Excerpts from William Morgan's message of Wed Jan 16 03:57:00 +0100 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-01-15: > > And I don't see your gettext patch neither on master nor on next ;( > > Whoops, I had never merged it onto next in the first place. Well, it's > on master now. Let me know if it gives you any trouble. Still not working, gettext is guessing ASCII-US but my LC_CTYPE contains en_US.UTF-8. What about `locale | grep LC_CTYPE | cut -d'"' -f2`? -- Nicolas Pouillard aka Ertai From wmorgan-sup@masanjin.net Tue Jan 15 22:20:45 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 19:20:45 -0800 Subject: [sup-talk] mailcap for os x In-Reply-To: <1200414674-sup-1175@spooky.local> References: <1196351498-sup-4803@spooky.local> <1198781360-sup-2193@south> <1200414674-sup-1175@spooky.local> Message-ID: <1200453317-sup-5958@south> Reformatted excerpts from Grant Hollingworth's message of 2008-01-15: > Excerpts from William Morgan's message of Thu Dec 27 13:50:26 -0500 2007: > > I'd willingly accept a patch to hook into Attachment#view! and allow > > overriding of the default run-mailcap behavior. > > Sure, but I don't know of the best way to do that. It wouldn't be like > other hooks, because it has to replace behaviour and not just > supplement it. That's not a problem. There are plenty of hooks that override default behavior if they're present, but do nothing if not. The quoteline one Marcus just submitted is a good example. > Lots of systems don't have run-mailcap(1). Probably we should port it > and push it out as a gem that Sup depends on. If we want to make some kind of a mailcap-parsing gem, there's a Python version that is probably more directly portable: http://docs.python.org/lib/module-mailcap.html Ruby doesn't seem to have any mailcap library, so this would be a good contribution to the community, especially if it played nicely with MIME::Types. Of course, mailcap only gets you Unix systems. Or does OS X use mailcaps? I imagine for Windows you would need some hideous registry parsing thing that I'm not even close to writing... -- William From wmorgan-sup@masanjin.net Tue Jan 15 22:23:35 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 19:23:35 -0800 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200453166-sup-9993@ausone.local> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> <1200447310-sup-8536@south> <1200449354-sup-9441@ausone.local> <1200452148-sup-9276@south> <1200453166-sup-9993@ausone.local> Message-ID: <1200453783-sup-4968@south> Sorry, meant to reply to list. Reformatted excerpts from nicolas.pouillard's message of 2008-01-15: > Still not working, gettext is guessing ASCII-US but my LC_CTYPE > contains en_US.UTF-8. Well crap. Do you have a $LC_CTYPE environment variable defined, that it's not picking up on? -- William From wmorgan-sup@masanjin.net Tue Jan 15 22:24:47 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 19:24:47 -0800 Subject: [sup-talk] header cache In-Reply-To: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> Message-ID: <1200453820-sup-4777@south> Reformatted excerpts from Giorgio Lando's message of 2008-01-15: > My "All mail" includes approximately 40000 messages so the fetching of > IMAP headers is highly time-consuming (also the initial sup-sync took > about 8 hours, but this happens only one time). > > I see that in TODO the header cache is scheduled for the 0.4 release. > So am I correct to expect it quite soon? Yes, I have a stub implementation in the works that should be ready for testing soon. I'll focus more attention on it now that I have a customer. :) -- William From nicolas.pouillard@gmail.com Tue Jan 15 22:28:54 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Wed, 16 Jan 2008 04:28:54 +0100 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200453783-sup-4968@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> <1200447310-sup-8536@south> <1200449354-sup-9441@ausone.local> <1200452148-sup-9276@south> <1200453166-sup-9993@ausone.local> <1200453783-sup-4968@south> Message-ID: <1200453980-sup-9189@ausone.local> Excerpts from William Morgan's message of Wed Jan 16 04:23:35 +0100 2008: > Sorry, meant to reply to list. > > Reformatted excerpts from nicolas.pouillard's message of 2008-01-15: > > Still not working, gettext is guessing ASCII-US but my LC_CTYPE > > contains en_US.UTF-8. > > Well crap. Do you have a $LC_CTYPE environment variable defined, that > it's not picking up on? Yes $LC_CTYPE is set to en_US.UTF-8. I've looked at the gettext code and found something: In locale_posix.rb: ... [ENV["LC_ALL"], ENV["LC_MESSAGES"], ENV["LANG"], ... In locale_win32.rb: ... ["LC_ALL", "LC_CTYPE", "LC_MESSAGES", "LANG"].each do |env| ... Adding LC_CTYPE to the first list solve my problem... -- Nicolas Pouillard aka Ertai From wmorgan-sup@masanjin.net Tue Jan 15 22:38:14 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 19:38:14 -0800 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200453980-sup-9189@ausone.local> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> <1200447310-sup-8536@south> <1200449354-sup-9441@ausone.local> <1200452148-sup-9276@south> <1200453166-sup-9993@ausone.local> <1200453783-sup-4968@south> <1200453980-sup-9189@ausone.local> Message-ID: <1200454570-sup-2537@south> Reformatted excerpts from nicolas.pouillard's message of 2008-01-15: > In locale_posix.rb: > ... > [ENV["LC_ALL"], ENV["LC_MESSAGES"], ENV["LANG"], > ... > > In locale_win32.rb: > ... > ["LC_ALL", "LC_CTYPE", "LC_MESSAGES", "LANG"].each do |env| > ... > > Adding LC_CTYPE to the first list solve my problem... Excellent, sounds like a bug in gettext. If you submit a bug report, would you mind cc'ing me? -- William From wmorgan-sup@masanjin.net Tue Jan 15 22:39:55 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 19:39:55 -0800 Subject: [sup-talk] mailcap for os x In-Reply-To: <1200453317-sup-5958@south> References: <1196351498-sup-4803@spooky.local> <1198781360-sup-2193@south> <1200414674-sup-1175@spooky.local> <1200453317-sup-5958@south> Message-ID: <1200454766-sup-5388@south> Reformatted excerpts from William Morgan's message of 2008-01-15: > Or does OS X use mailcaps? Hm, I think you answered this in your original email. -- William From wmorgan-sup@masanjin.net Tue Jan 15 23:06:01 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 20:06:01 -0800 Subject: [sup-talk] mailcap for os x In-Reply-To: <1200453317-sup-5958@south> References: <1196351498-sup-4803@spooky.local> <1198781360-sup-2193@south> <1200414674-sup-1175@spooky.local> <1200453317-sup-5958@south> Message-ID: <1200456328-sup-4928@south> Reformatted excerpts from William Morgan's message of 2008-01-15: > That's not a problem. There are plenty of hooks that override default > behavior if they're present, but do nothing if not. The quoteline one > Marcus just submitted is a good example. Something like this. Then you can move all the quick_look and explicit_view stuff in your original email into a mime-view.rb hook. diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb index 08dcf27..8e5def9 100644 --- a/lib/sup/message-chunks.rb +++ b/lib/sup/message-chunks.rb @@ -53,6 +53,16 @@ Variables: Return value: The decoded text of the attachment, or nil if not decoded. EOS + + HookManager.register "mime-view", < /dev/null 2> /dev/null" $? == 0 end + def view! + path = write_to_disk + ret = HookManager.run "mime-view", :content_type => @content_type, + :filename => path + view_default! path unless ret + end + def write_to_disk file = Tempfile.new(@filename || "sup-attachment") file.print @raw_content -- William From wmorgan-sup@masanjin.net Tue Jan 15 23:30:07 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 15 Jan 2008 20:30:07 -0800 Subject: [sup-talk] [PATCH] Search all threads with option to cancel In-Reply-To: <1200400125-sup-5900@tomsk> References: <1200071751-sup-5552@tomsk> <1200201168-sup-5812@south> <1200247733-sup-3710@tomsk> <1200272179-sup-6412@south> <1200307947-sup-1357@tomsk> <1200372469-sup-1813@south> <1200400125-sup-5900@tomsk> Message-ID: <1200457554-sup-9055@south> Reformatted excerpts from Marcus Williams's message of 2008-01-15: > This adds the ability to extend your search to display all threads > (which may take a _long_ time) instead of the standard maximum > (usually screen height). It is accessed via a multi-key action !C in > thread index modes. To cancel the search the user can press another > multi-key action !S. I think you should split this into two patches, the first of which adds the ability to stop any current thread-loading operation, and the second of which gives you the "load everything now" button. I'd like to evaluate each one independently. I think I'd like the stop loading button to be ^G, which is the general cancel command everywhere in Sup. The load everything now button can be a scary multi-key sequence like "!!". Comments welcome. -- William From nicolas.pouillard@gmail.com Wed Jan 16 03:46:08 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Wed, 16 Jan 2008 09:46:08 +0100 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200454570-sup-2537@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> <1200447310-sup-8536@south> <1200449354-sup-9441@ausone.local> <1200452148-sup-9276@south> <1200453166-sup-9993@ausone.local> <1200453783-sup-4968@south> <1200453980-sup-9189@ausone.local> <1200454570-sup-2537@south> Message-ID: <1200473133-sup-6533@ausone.local> Excerpts from William Morgan's message of Wed Jan 16 04:38:14 +0100 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-01-15: > > In locale_posix.rb: > > ... > > [ENV["LC_ALL"], ENV["LC_MESSAGES"], ENV["LANG"], > > ... > > > > In locale_win32.rb: > > ... > > ["LC_ALL", "LC_CTYPE", "LC_MESSAGES", "LANG"].each do |env| > > ... > > > > Adding LC_CTYPE to the first list solve my problem... > > Excellent, sounds like a bug in gettext. If you submit a bug report, > would you mind cc'ing me? http://rubyforge.org/tracker/index.php?func=detail&aid=17133&group_id=855&atid=3377 -- Nicolas Pouillard aka Ertai From nicolas.pouillard@gmail.com Wed Jan 16 03:51:54 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Wed, 16 Jan 2008 09:51:54 +0100 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200452938-sup-9442@south> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> <1200447310-sup-8536@south> <1200449354-sup-9441@ausone.local> <1200452148-sup-9276@south> <1200452938-sup-9442@south> Message-ID: <1200473352-sup-5980@ausone.local> Excerpts from William Morgan's message of Wed Jan 16 04:09:48 +0100 2008: > Reformatted excerpts from William Morgan's message of 2008-01-15: > > Reformatted excerpts from nicolas.pouillard's message of 2008-01-15: > > > And I don't see your gettext patch neither on master nor on next ;( > > > > Whoops, I had never merged it onto next in the first place. Well, it's > > on master now. Let me know if it gives you any trouble. > > Aaaand merged onto next. I do seem to spend a lot of my time merging > from master to next. I wonder if that's proper git usage. Seems to > clutter up my pretty gitk graph. I don't know the proper git usage, but I think that you should make all you commits on next, apply all patches from users on next, and then cherry-pick changes from next to master when they are well tested. -- Nicolas Pouillard aka Ertai From marcus-sup@bar-coded.net Wed Jan 16 05:47:39 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Wed, 16 Jan 2008 10:47:39 +0000 Subject: [sup-talk] [PATCH] Search all threads with option to cancel In-Reply-To: <1200457554-sup-9055@south> References: <1200071751-sup-5552@tomsk> <1200201168-sup-5812@south> <1200247733-sup-3710@tomsk> <1200272179-sup-6412@south> <1200307947-sup-1357@tomsk> <1200372469-sup-1813@south> <1200400125-sup-5900@tomsk> <1200457554-sup-9055@south> Message-ID: <1200480144-sup-10@tomsk> On 16.1.2008, William Morgan wrote: > I think you should split this into two patches, the first of which adds > the ability to stop any current thread-loading operation, and the second > of which gives you the "load everything now" button. I'd like to > evaluate each one independently. At the moment isnt the only thread-loading operation the load_n_threads method in thread-index-view? All the possibly long running operations that run threads that I can think of end up going through this as far as I can see. So do you want a patch for interrupting the load threads method, and then a patch to add the potentially long running load_all_threads? > I think I'd like the stop loading button to be ^G, which is the general > cancel command everywhere in Sup. The load everything now button can be > a scary multi-key sequence like "!!". > Ok, easily done - I didnt use ^G originally because I thought you couldnt overload a key action in a mode and I though ^G was added elsewhere. Marcus From grant@antiflux.org Wed Jan 16 11:32:06 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Wed, 16 Jan 2008 11:32:06 -0500 Subject: [sup-talk] [PATCH] Added quoteline hook for reply mode In-Reply-To: <1200389942-sup-6442@tomsk> References: <1200313448-sup-3169@tomsk> <1200374341-sup-8557@south> <1200388608-sup-6945@tomsk> <1200389942-sup-6442@tomsk> Message-ID: <1200501059-sup-4520@spooky.local> * Marcus Williams [Tue Jan 15 04:40:04 -0500 2008]: > This hook allows a user to configure a quote line for replies. The > default is the standard sup quote line "Excerpts from...". Multiple > lines are allowed. Thanks! I can take that off my to-do list now. I like Mutt's term "attribution" slightly more than "quoteline". From marcus-sup@bar-coded.net Wed Jan 16 11:39:43 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Wed, 16 Jan 2008 16:39:43 +0000 Subject: [sup-talk] [PATCH] Added quoteline hook for reply mode In-Reply-To: <1200501059-sup-4520@spooky.local> References: <1200313448-sup-3169@tomsk> <1200374341-sup-8557@south> <1200388608-sup-6945@tomsk> <1200389942-sup-6442@tomsk> <1200501059-sup-4520@spooky.local> Message-ID: <1200501489-sup-1907@tomsk> On 16.1.2008, Grant Hollingworth wrote: > I like Mutt's term "attribution" slightly more than "quoteline". :) I only called it quoteline because I couldnt think of a term for it. "attribution" is much nicer. Marcus From grant@antiflux.org Wed Jan 16 12:38:22 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Wed, 16 Jan 2008 12:38:22 -0500 Subject: [sup-talk] labels for updated messages Message-ID: <1200504528-sup-4009@spooky.local> When a message is updated, source labels are not applied to it. PollManager.do_poll: add_messages_from source do |m, offset, entry| ## always preserve the labels on disk. m.labels = entry[:label].split(/\s+/).map { |x| x.intern } if entry This means that when I write to a mailing list, the message never gets a list label applied, even when the message is updated from a source for that list. The thread will be missing its label unless someone replies to my message. The code above could merge in the source labels. It seems to me that it would be uncommon to remove a label only to have it re-added when the message is updated. It still bugs me to leave that unaddressed, though. We could keep track of deleted labels, but that seems like a lot of work for an uncommon situation. From patroclo7@gmail.com Wed Jan 16 15:26:44 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Wed, 16 Jan 2008 21:26:44 +0100 Subject: [sup-talk] header cache In-Reply-To: <1200453820-sup-4777@south> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> Message-ID: <1200514969-sup-7541@clarabella.clarabella> > Yes, I have a stub implementation in the works that should be ready for > testing soon. I'll focus more attention on it now that I have a > customer. :) Fine, ready for eventual testing, although I have finally decided to sync locally the 40000 messages with another tool, so to have them indexed and opened by sup in a faster way. Anyway I guess that a cache helps only relatively with such a monster (or at least also mutt's header cache helps only a bit with 40000 messages in an IMAP folder), so I will be able to make tests with other, much smaller imap folders. Giorgio From wmorgan-sup@masanjin.net Wed Jan 16 15:48:47 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 16 Jan 2008 12:48:47 -0800 Subject: [sup-talk] header cache In-Reply-To: <1200514969-sup-7541@clarabella.clarabella> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> Message-ID: <1200516410-sup-1963@south> Reformatted excerpts from Giorgio Lando's message of 2008-01-16: > Anyway I guess that a cache helps only relatively with such a monster > (or at least also mutt's header cache helps only a bit with 40000 > messages in an IMAP folder), so I will be able to make tests with > other, much smaller imap folders. If you look at the log messages, there's one at the emitted at the beginning of loading the headers, and one at the end, so you can see exactly how much time adding a cache will save you (minus however long it takes to load things in from disk). I'm curious what this number is for 40000 headers. It seems to be about 10 seconds for my 5000-message IMAP folder, so I can imagine it being quite significant. -- William From wmorgan-sup@masanjin.net Wed Jan 16 16:09:36 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 16 Jan 2008 13:09:36 -0800 Subject: [sup-talk] [PATCH] Search all threads with option to cancel In-Reply-To: <1200480144-sup-10@tomsk> References: <1200071751-sup-5552@tomsk> <1200201168-sup-5812@south> <1200247733-sup-3710@tomsk> <1200272179-sup-6412@south> <1200307947-sup-1357@tomsk> <1200372469-sup-1813@south> <1200400125-sup-5900@tomsk> <1200457554-sup-9055@south> <1200480144-sup-10@tomsk> Message-ID: <1200517677-sup-7041@south> Reformatted excerpts from Marcus Williams's message of 2008-01-16: > At the moment isnt the only thread-loading operation the > load_n_threads method in thread-index-view? All the possibly long > running operations that run threads that I can think of end up going > through this as far as I can see. Yes. > So do you want a patch for interrupting the load threads method, and > then a patch to add the potentially long running load_all_threads? Precisely. > Ok, easily done - I didnt use ^G originally because I thought you > couldnt overload a key action in a mode and I though ^G was added > elsewhere. In general that is more or less true, but ^G is only caught by the top-level event handler (which we override every time we define a mode-specific keyboard command), and by the text entry stuff, which does its own keyboard handling routine. So I think you should be fine. -- William From wmorgan-sup@masanjin.net Wed Jan 16 16:09:59 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 16 Jan 2008 13:09:59 -0800 Subject: [sup-talk] [PATCH] Added quoteline hook for reply mode In-Reply-To: <1200501489-sup-1907@tomsk> References: <1200313448-sup-3169@tomsk> <1200374341-sup-8557@south> <1200388608-sup-6945@tomsk> <1200389942-sup-6442@tomsk> <1200501059-sup-4520@spooky.local> <1200501489-sup-1907@tomsk> Message-ID: <1200517786-sup-7789@south> Reformatted excerpts from Marcus Williams's message of 2008-01-16: > :) I only called it quoteline because I couldnt think of a term for > it. "attribution" is much nicer. Patches welcome! :) -- William From patroclo7@gmail.com Wed Jan 16 17:04:26 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Wed, 16 Jan 2008 23:04:26 +0100 Subject: [sup-talk] header cache In-Reply-To: <1200516410-sup-1963@south> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> Message-ID: <1200519319-sup-915@clarabella.clarabella> > If you look at the log messages, there's one at the emitted at the > beginning of loading the headers, and one at the end, so you can see > exactly how much time adding a cache will save you (minus however long > it takes to load things in from disk). > > I'm curious what this number is for 40000 headers. It seems to be about > 10 seconds for my 5000-message IMAP folder, so I can imagine it being > quite significant. I guess you are referring to mutt: in this case I can confirm that the cache (mutt is compiled with gdbm) saves about 80 secs. What I meant is that it is nonetheless very slow, and that this is why one SHOULD NOT ordinarily access an IMAP folder with 40000 headers. In fact I do not do this in mutt, where on the contrary I enter INBOX and change folder only when needed (so only seldom I change to All Mail). I can not do exactly the same with sup: either I pull mails only from the INBOX, but then everything already archived in gmail through the web interface will not be seen by sup, or I go with All Mail, but then I have to load each time 40000 headers, which is extra slow (and would be very slow also with an header cache). Finally, there would not be any point to pull mails from all the other folders/labels, because they would include only duplicates of mails in All Mail and they would not enrich sup index at all. I have also the feeling that sup's philosophy is not very consistent with IMAP's philosophy, which is to access the same structure of folders from different interfaces, syncing immediately any operation on the server, so that folders and labels are exactly the same from any interface. Sup follows its own philosophy: thus, it does not deal with folders at all, and (as you admit often) does not aim to play well with other ways to check emails. Gmail's imap is not an exception to this conflict between sup's philosophy and imap's philosophy, because gmail's labels are, when you access gmail through IMAP, nothing else than folders! So I have finally decided to go back to POP3, download all mails (including mails sent from the web interface, in the case of gmail) locally and let sup index and open them locally. The mails are anyway kept on the server, so I can also access them through a traditional IMAP client with folders (such as mutt) or through the web interface when I am around the world without my laptop. In this way, I can use sup in a fast way without any bad interplay with other ways of checking emails. This is very important for me because I travel a lot and it is not possible for me to access emails exclusively from my own computers with sup installed :) . Thus I do not think that I will go back to access gmail through IMAP with sup. Anyway I hope to be able to do some testing of the IMAP headers cache with other small IMAP servers I have access to. Giorgio From alec@thened.net Wed Jan 16 17:58:17 2008 From: alec@thened.net (Alec Berryman) Date: Wed, 16 Jan 2008 16:58:17 -0600 Subject: [sup-talk] header cache In-Reply-To: <1200519319-sup-915@clarabella.clarabella> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> <1200519319-sup-915@clarabella.clarabella> Message-ID: <20080116225816.GA25381@thened.net> Giorgio Lando on 2008-01-16 23:04:26 +0100: > So I have finally decided to go back to POP3, download all mails (including > mails sent from the web interface, in the case of gmail) locally and let sup > index and open them locally. The mails are anyway kept on the server, so > I can also access them through a traditional IMAP client with folders > (such as mutt) or through the web interface when I am around the world > without my laptop. Have you looked at offlineimap? I started using it with mutt because IMAP, even with header cachine, was just way too slow. From patroclo7@gmail.com Wed Jan 16 18:36:55 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Thu, 17 Jan 2008 00:36:55 +0100 Subject: [sup-talk] header cache In-Reply-To: <20080116225816.GA25381@thened.net> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> <1200519319-sup-915@clarabella.clarabella> <20080116225816.GA25381@thened.net> Message-ID: <1200526085-sup-9510@clarabella.clarabella> Excerpts from Alec Berryman's message of Wed Jan 16 23:58:17 +0100 2008: > Have you looked at offlineimap? I started using it with mutt because > IMAP, even with header cachine, was just way too slow. Yes, I have used it and isync: you are right,they solve the problem of the slowness, since all the syncing happens in the background when using mutt or sup. But still I think that, when one does not care about folders and about synchronization of different interfaces, the intrinsic advantages of IMAP over POP3 tend to disappear. On the contrary there is the risk of strange interplay (such as sup changing the flags in way that offlineimap syncs to an IMAP server which does not understand or does strange things); a solution is to use isync as a push-only synchronizer (only sync the changes from the server to the local machine and not the opposite), but really in this way you loose all the advantages of IMAP and I prefer to use well-tested and powerful fetchers for POP3, such as fdm and getmail. Obviously if on the contrary for some reason you are forced to use IMAP, then offlineimap and isync are the best solution Giorgio From wmorgan-sup@masanjin.net Wed Jan 16 20:52:57 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 16 Jan 2008 17:52:57 -0800 Subject: [sup-talk] new in next: thread joining and better quotes Message-ID: <1200533604-sup-2015@south> Some minor quote-detection improvements in next, so tell me if the quote blocks (the "+ (n quoted lines)" blocks) are wrong. I don't think I'll be able to always get all cases, but at least the more common ones should be detected now. Also, you can now select multiple threads and press '#' to join them into one thread. Once you write this back to index, there's no good way to split them apart besides sup-syncing, so be careful. -- William From nicolas.pouillard@gmail.com Thu Jan 17 03:13:21 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Thu, 17 Jan 2008 09:13:21 +0100 Subject: [sup-talk] header cache In-Reply-To: <1200519319-sup-915@clarabella.clarabella> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> <1200519319-sup-915@clarabella.clarabella> Message-ID: <1200557516-sup-8444@ausone.local> Excerpts from Giorgio Lando's message of Wed Jan 16 23:04:26 +0100 2008: > [...] > So I have finally decided to go back to POP3, download all mails (including > mails sent from the web interface, in the case of gmail) locally and let sup > index and open them locally. The mails are anyway kept on the server, so > I can also access them through a traditional IMAP client with folders > (such as mutt) or through the web interface when I am around the world > without my laptop. I use this setup too, using mbox and it's quite fast. -- Nicolas Pouillard aka Ertai From patroclo7@gmail.com Thu Jan 17 06:40:47 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Thu, 17 Jan 2008 12:40:47 +0100 Subject: [sup-talk] header cache In-Reply-To: <1200557516-sup-8444@ausone.local> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> <1200519319-sup-915@clarabella.clarabella> <1200557516-sup-8444@ausone.local> Message-ID: <1200570003-sup-1529@clarabella.clarabella> Excerpts from nicolas.pouillard's message of Thu Jan 17 09:13:21 +0100 2008: > Excerpts from Giorgio Lando's message of Wed Jan 16 23:04:26 +0100 2008: > > > > [...] > > > So I have finally decided to go back to POP3, download all mails (including > > mails sent from the web interface, in the case of gmail) locally and let sup > > index and open them locally. The mails are anyway kept on the server, so > > I can also access them through a traditional IMAP client with folders > > (such as mutt) or through the web interface when I am around the world > > without my laptop. > > I use this setup too, using mbox and it's quite fast. Yes, it is fast also with maildir! Quite satisfied Giorgio -- Giorgio Lando From marko.myllymaki@iki.fi Thu Jan 17 07:51:51 2008 From: marko.myllymaki@iki.fi (=?UTF-8?B?TWFya28gTXlsbHltw6RraQ==?=) Date: Thu, 17 Jan 2008 14:51:51 +0200 Subject: [sup-talk] char. encoding problems - garbled output Message-ID: <478F4F67.1040405@iki.fi> Hi, Sup seems very promising email-client for my purposes, good job! However, I have some problems with wrong character encodings which garble the sup output a bit unusable... Uppercase umlaut characters seem to be the biggest problem. But I may also have some configuration option wrong.. The following mail has weird content-type: Content-type: multipart/mixed; boundary="===============2134700068==" And here is the garbled output for that mail, which makes also other lines in the message list interface garbled :( ---- Yest. 9am laskutus >Some subject text... +/INBOX K?~DYT?~D EHDOTTOMASTI VIITETT ?~D Jan 15 ---- This kind of content-type works fine with umlaut ??????: Content-type: text/plain; charset=ISO-8859-1; format=flowed But this doesn't: Content-type: text/plain; Format=Flowed; Charset=iso-8859-1 I'm not actually sure what causes these problems, there may be something else too... at the moment I'm using thunderbird email client and it handles all the encodings well. But I want to change it to Sup :) -Marko From nicolas.pouillard@gmail.com Thu Jan 17 09:56:19 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Thu, 17 Jan 2008 15:56:19 +0100 Subject: [sup-talk] header cache In-Reply-To: <1200570003-sup-1529@clarabella.clarabella> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> <1200519319-sup-915@clarabella.clarabella> <1200557516-sup-8444@ausone.local> <1200570003-sup-1529@clarabella.clarabella> Message-ID: <1200581670-sup-9273@ausone.local> Excerpts from Giorgio Lando's message of Thu Jan 17 12:40:47 +0100 2008: > Excerpts from nicolas.pouillard's message of Thu Jan 17 09:13:21 +0100 2008: > > Excerpts from Giorgio Lando's message of Wed Jan 16 23:04:26 +0100 2008: > > > > > > > [...] > > > > > So I have finally decided to go back to POP3, download all mails (including > > > mails sent from the web interface, in the case of gmail) locally and let sup > > > index and open them locally. The mails are anyway kept on the server, so > > > I can also access them through a traditional IMAP client with folders > > > (such as mutt) or through the web interface when I am around the world > > > without my laptop. > > > > I use this setup too, using mbox and it's quite fast. > > Yes, it is fast also with maildir! Quite satisfied I've also tried maildir for some time, and found it slower. That's because Sup needs to compute a hash from file names to message ids. -- Nicolas Pouillard aka Ertai From grant@antiflux.org Thu Jan 17 12:49:21 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Thu, 17 Jan 2008 12:49:21 -0500 Subject: [sup-talk] [PATCH] renamed "quoteline" hook to "attribution" In-Reply-To: <1200517786-sup-7789@south> References: <1200313448-sup-3169@tomsk> <1200374341-sup-8557@south> <1200388608-sup-6945@tomsk> <1200389942-sup-6442@tomsk> <1200501059-sup-4520@spooky.local> <1200501489-sup-1907@tomsk> <1200517786-sup-7789@south> Message-ID: <1200591847-sup-3296@spooky.local> --- lib/sup/modes/reply-mode.rb | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb index 2d05f15..3b8c920 100644 --- a/lib/sup/modes/reply-mode.rb +++ b/lib/sup/modes/reply-mode.rb @@ -10,10 +10,11 @@ class ReplyMode < EditMessageMode :user => "Customized" } - HookManager.register "quoteline", < m) || default_quoteline(m) - lines = quoteline.split("\n") + m.quotable_body_lines.map { |l| "> #{l}" } + attribution = HookManager.run("attribution", :message => m) || default_attribution(m) + lines = attribution.split("\n") + m.quotable_body_lines.map { |l| "> #{l}" } lines.pop while lines.last =~ /^\s*$/ lines end - def default_quoteline m + def default_attribution m "Excerpts from #{@m.from.name}'s message of #{@m.date}:" end -- 1.5.3.7 From its.jeff.balogh@gmail.com Thu Jan 17 14:27:15 2008 From: its.jeff.balogh@gmail.com (Jeff Balogh) Date: Thu, 17 Jan 2008 14:27:15 -0500 Subject: [sup-talk] sup not seeing new messages in a maildir Message-ID: <1200598009-sup-5063@archie> I've been running sup for a while from gmail imap, and sup is great, but it was miserably slow. Yesterday I switched to using offlineimap, and pointed sup at the maildir. Now sup isn't noticing any new messages (yes, they are there). It does pick them up if I run sup-sync --changed, but not with --new. Any ideas? Thanks. -- jeff From patroclo7@gmail.com Thu Jan 17 16:38:03 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Thu, 17 Jan 2008 22:38:03 +0100 Subject: [sup-talk] sup not seeing new messages in a maildir In-Reply-To: <1200598009-sup-5063@archie> References: <1200598009-sup-5063@archie> Message-ID: <1200605584-sup-5549@clarabella.clarabella> > I've been running sup for a while from gmail imap, and sup is great, but it was > miserably slow. Yesterday I switched to using offlineimap, and pointed sup at > the maildir. I can only confirm that this happened to me too, not with maildir in general, but with only a giant maildir generated syncing an imap folder with offlineimap. For the reasons explained in another thread, I then stopped to experiment with it, and actually I did not investigate the reasons of this behaviour (also for me the options -a and -c for sup-sync ere the only way to find the new mails). Since I am now using successfully sup with big maildirs generated by other tools, one could suspect that the problem is just in the interplay with offlineimap and the flags offlineimap gives to the synced emails. -- Giorgio Lando From dfortunato@gmail.com Thu Jan 17 19:11:22 2008 From: dfortunato@gmail.com (David Fortunato) Date: Thu, 17 Jan 2008 19:11:22 -0500 Subject: [sup-talk] crash with 'Too many clauses' Message-ID: <12ACF456-3FEA-4BC0-B4AD-BD918B80C095@gmail.com> I've run into a problem with sup 0.3. I tried the current git HEAD and have the same problem. It seems similar to http://rubyforge.org/pipermail/sup-talk/2007-December/000688.html The crash log is attached, any ideas? Thanks, Dave --- Ferret::StateError from thread: load threads for thread-index-mode State Error occured at :93 in xraise Error occured in q_boolean.c:1595 - bq_add_query_nr Two many clauses. The max clause limit is set to <1024> but your query has <1024> clauses . You can try increasing :max_clause_count for the BooleanQuery or using a different type of quer y. /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/index.rb:270:in `add_query' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/index.rb:270:in `each_message_in_thread_for' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/index.rb:268:in `each' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/index.rb:268:in `each_message_in_thread_for' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/thread.rb:321:in `load_thread_for_message' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/thread.rb:313:in `load_n_threads' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/index.rb:217:in `each_id_by_date' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/index.rb:217:in `each' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/index.rb:217:in `each_id_by_date' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/thread.rb:308:in `load_n_threads' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/thread-index-mode.rb: 415:in `__unprotected_load _n_threads' (eval):12:in `load_n_threads' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/thread-index-mode.rb: 404:in `load_n_threads_bac kground' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup.rb:69:in `reporting_thread' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup.rb:67:in `initialize' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup.rb:67:in `new' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup.rb:67:in `reporting_thread' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/thread-index-mode.rb: 403:in `load_n_threads_bac kground' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/modes/thread-index-mode.rb: 454:in `__unprotected_load _threads' (eval):12:in `load_threads' bin/sup:185 --- SystemExit from thread: main State Error occured at :93 in xraise Error occured in q_boolean.c:1595 - bq_add_query_nr Two many clauses. The max clause limit is set to <1024> but your query has <1024> clauses . You can try increasing :max_clause_count for the BooleanQuery or using a different type of quer y. /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup.rb:73:in `select' /Library/Ruby/Gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:31:in `nonblocking_getch' bin/sup:198 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sup-exception-log-git.txt Url: http://rubyforge.org/pipermail/sup-talk/attachments/20080117/e139b3e0/attachment.txt -------------- next part -------------- From dfortunato@gmail.com Thu Jan 17 21:56:37 2008 From: dfortunato@gmail.com (David Fortunato) Date: Thu, 17 Jan 2008 18:56:37 -0800 (PST) Subject: [sup-talk] crash with 'Too many clauses' In-Reply-To: <12ACF456-3FEA-4BC0-B4AD-BD918B80C095@gmail.com> References: <12ACF456-3FEA-4BC0-B4AD-BD918B80C095@gmail.com> Message-ID: <14944700.post@talk.nabble.com> Please ignore the previous email. I hadn't read HACKING yet, and it was running the 0.3 gem. Everything is working great. -- View this message in context: http://www.nabble.com/crash-with-%27Too-many-clauses%27-tp14939928p14944700.html Sent from the SUP Talk mailing list archive at Nabble.com. From its.jeff.balogh@gmail.com Fri Jan 18 03:58:33 2008 From: its.jeff.balogh@gmail.com (Jeff Balogh) Date: Fri, 18 Jan 2008 03:58:33 -0500 Subject: [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits. Message-ID: <1200646334-sup-3256@archie> The size needs to be <= 7 digits to preserve sup's increasing id requirement. Otherwise, large messages (probably w/ attachments) have an id that is a magnitude larger than small messages. --- lib/sup/maildir.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb index ba9da00..7b85383 100644 --- a/lib/sup/maildir.rb +++ b/lib/sup/maildir.rb @@ -144,7 +144,7 @@ private def make_id fn # use 7 digits for the size. why 7? seems nice. - sprintf("%d%07d", File.mtime(fn), File.size(fn)).to_i + sprintf("%d%07d", File.mtime(fn), File.size(fn) % 10000000).to_i end def with_file_for id -- 1.5.3.7 From nicolas.pouillard@gmail.com Fri Jan 18 04:59:59 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Fri, 18 Jan 2008 10:59:59 +0100 Subject: [sup-talk] [PATCH] Show drafts in red, in thread-index-mode. Message-ID: <12006503991760-git-send-email-nicolas.pouillard@gmail.com> This patch would help to think about finishing drafts. --- bin/sup | 2 ++ lib/sup/modes/thread-index-mode.rb | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/sup b/bin/sup index 7314227..a49e2c4 100644 --- a/bin/sup +++ b/bin/sup @@ -137,6 +137,8 @@ begin Ncurses::A_BOLD c.add :index_starred_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_BLACK, Ncurses::A_BOLD + c.add :index_draft_color, Ncurses::COLOR_RED, Ncurses::COLOR_BLACK, + Ncurses::A_BOLD c.add :labellist_old_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK c.add :labellist_new_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK, Ncurses::A_BOLD diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 0d90be4..fac7500 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -599,7 +599,6 @@ protected date = t.date.to_nice_s - new = t.has_label?(:unread) starred = t.has_label?(:starred) ## format the from column @@ -636,7 +635,9 @@ protected p = dp || t.participants.any? { |p| AccountManager.is_account? p } subj_color = - if new + if t.has_label?(:draft) + :index_draft_color + elsif t.has_label?(:unread) :index_new_color elsif starred :index_starred_color -- 1.5.3.1.109.gacd69 From nicolas.pouillard@gmail.com Fri Jan 18 05:03:21 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Fri, 18 Jan 2008 11:03:21 +0100 Subject: [sup-talk] [PATCH] Show drafts in red, in thread-index-mode. In-Reply-To: <12006503991760-git-send-email-nicolas.pouillard@gmail.com> References: <12006503991760-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1200650441-sup-9935@ausone.inria.fr> Excerpts from Nicolas Pouillard's message of Fri Jan 18 10:59:59 +0100 2008: > This patch would help to think about finishing drafts. Colors and UI are rather user dependent, so it's just in case... -- Nicolas Pouillard aka Ertai From vasudeva@linkswarm.com Fri Jan 18 11:37:07 2008 From: vasudeva@linkswarm.com (vasudeva) Date: Fri, 18 Jan 2008 11:37:07 -0500 Subject: [sup-talk] [PATCH] More gmail search goodness In-Reply-To: <1198367430-sup-936@south> References: <1196202259-sup-7348@tomsk> <1198367430-sup-936@south> Message-ID: <1200673899-sup-1833@lenin> Excerpts from William Morgan's message of Sat Dec 22 19:45:54 -0500 2007: > Excerpts from Marcus Williams's message of Tue Nov 27 14:34:02 -0800 2007: > > > > I'd like to add a has:attachment operator but the ferret index doesnt > > appear to store enough info for this. It would be really nice to be > > able to search for attachments (of certain types as well with > > filename:...) I took a look at extending the index to add a new field > > "filename" that contains a list of filenames attached to a message, > > but this would break everyones index so I'm just requesting it as a > > wishlist item rather than submitting a patch. > > You're right, it requires adding an attachment field to the index. I > think that adding a field to the Ferret index doesn't break index > compatibility, so this actually might not be too hard to do. You'll have > to rebuild the index to fill in the attachment status for pre-existing > messages, but the change wouldn't invalidate anyone's index. Was there every any movement in this direction? Specifically, toward a has:attachment search function? I ask because I find myself repeatedly running out of diskspace at work (Outlook, 100Mb PST), which is actually almost enough space, without a particular line of business that causes customers to mail me gigantic attachments (1.5Mb PDF containing a 20k GIF, awesome), which I then have to go in and delete. I mucked about with ways of programmatically seeking these out and deleting them, before it eventually dawned on me that attachment references aren't stored in the index. (Business like 'is:larger-than=1000k' would be nifty.) -- linkswarm.com :: Collaborative Insolence vasudeva.linkswarm.com/gallery :: For The Faint of Heart From nicolas.pouillard@gmail.com Fri Jan 18 11:40:19 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Fri, 18 Jan 2008 17:40:19 +0100 Subject: [sup-talk] the proper way of determining the encoding In-Reply-To: <1200473133-sup-6533@ausone.local> References: <1199569265-sup-4567@clarabella.clarabella> <1199685831-sup-2011@south> <1199695733-sup-2741@clarabella.clarabella> <1199901555-sup-2661@south> <1199925510-sup-7503@clarabella.clarabella> <1200190710-sup-6881@south> <1200414495-sup-4477@spooky.local> <1200447310-sup-8536@south> <1200449354-sup-9441@ausone.local> <1200452148-sup-9276@south> <1200453166-sup-9993@ausone.local> <1200453783-sup-4968@south> <1200453980-sup-9189@ausone.local> <1200454570-sup-2537@south> <1200473133-sup-6533@ausone.local> Message-ID: <1200674268-sup-6999@ausone.inria.fr> Excerpts from Nicolas Pouillard's message of Wed Jan 16 09:46:08 +0100 2008: > Excerpts from William Morgan's message of Wed Jan 16 04:38:14 +0100 2008: > > Reformatted excerpts from nicolas.pouillard's message of 2008-01-15: > > > In locale_posix.rb: > > > ... > > > [ENV["LC_ALL"], ENV["LC_MESSAGES"], ENV["LANG"], > > > ... > > > > > > In locale_win32.rb: > > > ... > > > ["LC_ALL", "LC_CTYPE", "LC_MESSAGES", "LANG"].each do |env| > > > ... > > > > > > Adding LC_CTYPE to the first list solve my problem... > > > > Excellent, sounds like a bug in gettext. If you submit a bug report, > > would you mind cc'ing me? > > http://rubyforge.org/tracker/index.php?func=detail&aid=17133&group_id=855&atid=3377 > It's end by a "wont fix": """ Date: 2008-01-17 12:29 Sender: Masao Mutoh LC_CTYPE is not for messaging. So locale_win32.rb was wrong. And it removed in current CVS version. """ I don't know much about locale and encoding but I thought LC_CTYPE was a good way of setting it. -- Nicolas Pouillard aka Ertai From grant@antiflux.org Fri Jan 18 12:06:49 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Fri, 18 Jan 2008 12:06:49 -0500 Subject: [sup-talk] [PATCH] return sources in id-order, with non-archived sources first Message-ID: <1200675726-sup-4860@spooky.local> To speed up the user's view of polling, deal with sources that affect the inbox before (for example) large mailing lists. It seemed tidier to implement this in Index rather than PollManager. I changed "@sources.values" to "sources" in some other methods for clarity, which I think in this case outweighs lost efficiency. --- lib/sup/index.rb | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/sup/index.rb b/lib/sup/index.rb index 1997c92..b2a1612 100644 --- a/lib/sup/index.rb +++ b/lib/sup/index.rb @@ -125,9 +125,13 @@ EOS @sources[source.id] = source end - def source_for uri; @sources.values.find { |s| s.is_source_for? uri }; end - def usual_sources; @sources.values.find_all { |s| s.usual? }; end - def sources; @sources.values; end + def sources + ## favour the inbox by listing non-archived sources first + @sources.values.sort_by {|s| s.id }.partition {|s| !s.archived? }.flatten + end + + def source_for uri; sources.find { |s| s.is_source_for? uri }; end + def usual_sources; sources.find_all { |s| s.usual? }; end def load_index dir=File.join(@dir, "ferret") if File.exists? dir @@ -512,7 +516,7 @@ protected File.chmod 0600, fn FileUtils.mv fn, bakfn, :force => true unless File.exists?(bakfn) && File.size(fn) == 0 end - Redwood::save_yaml_obj @sources.values.sort_by { |s| s.id.to_i }, fn, true + Redwood::save_yaml_obj sources.sort_by { |s| s.id.to_i }, fn, true File.chmod 0600, fn end @sources_dirty = false -- 1.5.3.7 From marcus-sup@bar-coded.net Fri Jan 18 12:18:00 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Fri, 18 Jan 2008 17:18:00 +0000 Subject: [sup-talk] [PATCH] More gmail search goodness In-Reply-To: <1200673899-sup-1833@lenin> References: <1196202259-sup-7348@tomsk> <1198367430-sup-936@south> <1200673899-sup-1833@lenin> Message-ID: <1200676644-sup-5342@tomsk> On 18.1.2008, vasudeva wrote: > Was there every any movement in this direction? Specifically, toward a > has:attachment search function? Its next on my todo list :) unless someone else has picked it up. Marcus From johnbent@gmail.com Sat Jan 19 00:21:44 2008 From: johnbent@gmail.com (John Bent) Date: Fri, 18 Jan 2008 22:21:44 -0700 Subject: [sup-talk] sup crash on tab completion Message-ID: Hey William, I'm just trying out sup and I'm really excited about it so far. My deal is that I really like gmail but my work doesn't allow us to use any external web servers so I can't forward my work email to gmail. My work's webmail absolutely sucks so I want to run some client on my own computer but I also want to use it when I'm on a different computer. So I need something that works over X-windows or in the console. I was using pine but I got completely frustrated by the lack of search. So sup looks really great. I'm only just starting to mess with it and some things do seem a little strange. For example, can I remove a label? By I'm hoping that most of the problems I'm seeing so far are just learning curve. So really, thank you so much for writing sup - it's exactly what I want / need. Anyway, I did just crash it when I was doing tab completion on a contact. The two possible contacts were: John Bent and John Bent (gmail) . It was prompting me to either add a < or a (. It died when I added the ( and hit TAB: --- RegexpError from thread: main premature end of regular expression: /^John Bent (/ /opt/local/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:426:in `ask_many_emails_with_completions' Also, I can't figure out how to search on the from field. I'm doing from:Username and getting an empty thing. Also, can I automatically archive sent-messages that aren't part of a thread that includes received messages? Thanks again! John -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/sup-talk/attachments/20080118/57f947c7/attachment.html From wmorgan-sup@masanjin.net Sat Jan 19 12:18:13 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 19 Jan 2008 09:18:13 -0800 Subject: [sup-talk] labels for updated messages In-Reply-To: <1200504528-sup-4009@spooky.local> References: <1200504528-sup-4009@spooky.local> Message-ID: <1200761079-sup-3213@south> Reformatted excerpts from Grant Hollingworth's message of 2008-01-16: > When a message is updated, source labels are not applied to it. > > PollManager.do_poll: > add_messages_from source do |m, offset, entry| > ## always preserve the labels on disk. > m.labels = entry[:label].split(/\s+/).map { |x| x.intern } if entry > > This means that when I write to a mailing list, the message never gets > a list label applied, even when the message is updated from a source > for that list. The thread will be missing its label unless someone > replies to my message. This is a good point, and it's related to the broader question of, when multiple different copies of a message, which should take precedence? (In addition to having different automatically-assigned labels, the subject may be rewritten by the list, list signatures may be added, etc.) The obvious answer is that later messages should supercede earlier ones, and I think that's what most MUAs do. Regardless, we definitely need to merge labels so that we don't lose user information. What is tricky in our case is that sup-sync may be called to reprocess a source containing an older copy of the message. We then have two options: 1. Oh well. If you reprocess an older message, you'll get its version, and you just have to be aware of it. 2. Keep the arrival time of each message in the index, and guarantee the later-supercedes-earlier behavior described above. I'm leaning towards #1, since it's less work. :) > The code above could merge in the source labels. It seems to me that > it would be uncommon to remove a label only to have it re-added when > the message is updated. It still bugs me to leave that unaddressed, > though. We could keep track of deleted labels, but that seems like a > lot of work for an uncommon situation. I'm having a hard time imagining what the situation in which a label would be re-added would even look like. Something like: you send a message to a list, tag it with the label that is automatically applied to messages of that list, but then decide to remove that label, only to have it readded when the ML copy arrives? Seems pretty unlikely. -- William From wmorgan-sup@masanjin.net Sat Jan 19 12:25:00 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 19 Jan 2008 09:25:00 -0800 Subject: [sup-talk] char. encoding problems - garbled output In-Reply-To: <478F4F67.1040405@iki.fi> References: <478F4F67.1040405@iki.fi> Message-ID: <1200763427-sup-2564@south> Hi Marko, Reformatted excerpts from =?UTF-8?B?TWFya28gTXlsbHltw6RraQ==?='s message of 2008-01-17: > This kind of content-type works fine with umlaut ??????: > Content-type: text/plain; charset=ISO-8859-1; format=flowed > > But this doesn't: > Content-type: text/plain; Format=Flowed; Charset=iso-8859-1 Does the following patch help? diff --git a/lib/sup/util.rb b/lib/sup/util.rb index 47bc1c2..ceaf0b8 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -62,7 +62,7 @@ module RMail end def charset - if header.field?("content-type") && header.fetch("content-type") =~ /charset="?(.*?)"?(;|$)/ + if header.field?("content-type") && header.fetch("content-type") =~ /charset="?(.*?)"?(;|$)/i $1 end end -- William From marcus-sup@bar-coded.net Sat Jan 19 13:42:57 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sat, 19 Jan 2008 18:42:57 +0000 Subject: [sup-talk] [PATCH] Add ability to interrupt current thread operation (search) Message-ID: <1200768101-sup-3312@tomsk> This adds the ability to stop the current threading operation. This is usually a search, but its anything that ends up calling load_n_threads in thread-index-view. The user can hit ctrl-g to stop the operation. --- lib/sup/modes/thread-index-mode.rb | 34 +++++++++++++++++++++++++++++----- lib/sup/thread.rb | 2 +- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index dec3c1d..a265a04 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -16,6 +16,7 @@ EOS register_keymap do |k| k.add :load_threads, "Load #{LOAD_MORE_THREAD_NUM} more threads", 'M' + k.add :cancel_search, "Cancel current search", :ctrl_g k.add :reload, "Refresh view", '@' k.add :toggle_archived, "Toggle archived status", 'a' k.add :toggle_starred, "Star or unstar all messages in thread", '*' @@ -50,6 +51,8 @@ EOS @load_thread_opts = load_thread_opts @hidden_labels = hidden_labels + LabelManager::HIDDEN_RESERVED_LABELS @date_width = DATE_WIDTH + + @interrupt_search = false initialize_threads # defines @ts and @ts_mutex update # defines @text and @lines @@ -456,16 +459,22 @@ EOS ## TODO: figure out @ts_mutex in this method def load_n_threads n=LOAD_MORE_THREAD_NUM, opts={} + @interrupt_search = false @mbid = BufferManager.say "Searching for threads..." + + ts_to_load = n + ts_to_load = ts_to_load + @ts.size unless n == -1 # -1 means all threads + orig_size = @ts.size last_update = Time.now - @ts.load_n_threads(@ts.size + n, opts) do |i| + @ts.load_n_threads(ts_to_load, opts) do |i| if (Time.now - last_update) >= 0.25 - BufferManager.say "Loaded #{i.pluralize 'thread'}...", @mbid + BufferManager.say "Loaded #{i.pluralize 'thread'} (use ^G to cancel search)...", @mbid update BufferManager.draw_screen last_update = Time.now end + break if @interrupt_search end @ts.threads.each { |th| th.labels.each { |l| LabelManager << l } } @@ -485,13 +494,28 @@ EOS end end - def load_threads opts={} - n = opts[:num] || ThreadIndexMode::LOAD_MORE_THREAD_NUM + def cancel_search + @interrupt_search = true + end + def load_all_threads + load_threads :num => -1 + end + + def load_threads opts={} + if opts[:num].nil? + n = ThreadIndexMode::LOAD_MORE_THREAD_NUM + else + n = opts[:num] + end + myopts = @load_thread_opts.merge({ :when_done => (lambda do |num| opts[:when_done].call(num) if opts[:when_done] + + cancelled = @interrupt_search?" (search cancelled by user)":"" + if num > 0 - BufferManager.flash "Found #{num.pluralize 'thread'}." + BufferManager.flash "Found #{num.pluralize 'thread'}#{cancelled}." else BufferManager.flash "No matches." end diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb index 32002c4..09fbfbb 100644 --- a/lib/sup/thread.rb +++ b/lib/sup/thread.rb @@ -324,7 +324,7 @@ class ThreadSet ## load in (at most) num number of threads from the index def load_n_threads num, opts={} @index.each_id_by_date opts do |mid, builder| - break if size >= num + break if size >= num unless num == -1 next if contains_id? mid m = builder.call -- 1.5.3.7 From marcus-sup@bar-coded.net Sat Jan 19 13:49:04 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sat, 19 Jan 2008 18:49:04 +0000 Subject: [sup-talk] [PATCH] Add ability to interrupt current thread operation (search) In-Reply-To: <1200768101-sup-3312@tomsk> References: <1200768101-sup-3312@tomsk> Message-ID: <1200768474-sup-7396@tomsk> On 19.1.2008, I wrote: > This adds the ability to stop the current threading operation. This > is usually a search, but its anything that ends up calling > load_n_threads in thread-index-view. The user can hit ctrl-g to stop > the operation. bah... sorry sent a duff patch that included some stuff for the load all threads option. Will resend again so ignore that one! Marcus From marcus-sup@bar-coded.net Sat Jan 19 13:59:14 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sat, 19 Jan 2008 18:59:14 +0000 Subject: [sup-talk] [PATCH] Add ability to interrupt current thread operation (search) In-Reply-To: <1200768474-sup-7396@tomsk> References: <1200768101-sup-3312@tomsk> <1200768474-sup-7396@tomsk> Message-ID: <1200769080-sup-4420@tomsk> This adds the ability to stop the current threading operation. This is usually a search, but its anything that ends up calling load_n_threads in thread-index-view. The user can hit ctrl-g to stop the operation. --- lib/sup/modes/thread-index-mode.rb | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index dec3c1d..2b8cc20 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -16,6 +16,7 @@ EOS register_keymap do |k| k.add :load_threads, "Load #{LOAD_MORE_THREAD_NUM} more threads", 'M' + k.add :cancel_search, "Cancel current search", :ctrl_g k.add :reload, "Refresh view", '@' k.add :toggle_archived, "Toggle archived status", 'a' k.add :toggle_starred, "Star or unstar all messages in thread", '*' @@ -50,6 +51,8 @@ EOS @load_thread_opts = load_thread_opts @hidden_labels = hidden_labels + LabelManager::HIDDEN_RESERVED_LABELS @date_width = DATE_WIDTH + + @interrupt_search = false initialize_threads # defines @ts and @ts_mutex update # defines @text and @lines @@ -456,16 +459,19 @@ EOS ## TODO: figure out @ts_mutex in this method def load_n_threads n=LOAD_MORE_THREAD_NUM, opts={} + @interrupt_search = false @mbid = BufferManager.say "Searching for threads..." + orig_size = @ts.size last_update = Time.now @ts.load_n_threads(@ts.size + n, opts) do |i| if (Time.now - last_update) >= 0.25 - BufferManager.say "Loaded #{i.pluralize 'thread'}...", @mbid + BufferManager.say "Loaded #{i.pluralize 'thread'} (use ^G to cancel)...", @mbid update BufferManager.draw_screen last_update = Time.now end + break if @interrupt_search end @ts.threads.each { |th| th.labels.each { |l| LabelManager << l } } @@ -485,13 +491,20 @@ EOS end end + def cancel_search + @interrupt_search = true + end + def load_threads opts={} n = opts[:num] || ThreadIndexMode::LOAD_MORE_THREAD_NUM myopts = @load_thread_opts.merge({ :when_done => (lambda do |num| opts[:when_done].call(num) if opts[:when_done] + + cancelled = @interrupt_search?" (search cancelled by user)":"" + if num > 0 - BufferManager.flash "Found #{num.pluralize 'thread'}." + BufferManager.flash "Found #{num.pluralize 'thread'}#{cancelled}." else BufferManager.flash "No matches." end -- 1.5.3.7 From marcus-sup@bar-coded.net Sat Jan 19 14:17:03 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sat, 19 Jan 2008 19:17:03 +0000 Subject: [sup-talk] [PATCH] Allow user to show all matching threads Message-ID: <1200770173-sup-671@tomsk> This adds a double keypress action "!!" to load all threads in the current search/view. Obviously this can return a lot of threads, but coupled with the cancel search option it is now easy to stop. --- lib/sup/modes/thread-index-mode.rb | 18 ++++++++++++++++-- lib/sup/thread.rb | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 2b8cc20..1785a91 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -16,6 +16,9 @@ EOS register_keymap do |k| k.add :load_threads, "Load #{LOAD_MORE_THREAD_NUM} more threads", 'M' + k.add_multi "Load all threads (! to confirm) :", '!' do |kk| + kk.add :load_all_threads, "Load all threads (may list a _lot_ of threads)", '!' + end k.add :cancel_search, "Cancel current search", :ctrl_g k.add :reload, "Refresh view", '@' k.add :toggle_archived, "Toggle archived status", 'a' @@ -462,9 +465,12 @@ EOS @interrupt_search = false @mbid = BufferManager.say "Searching for threads..." + ts_to_load = n + ts_to_load = ts_to_load + @ts.size unless n == -1 # -1 means all threads + orig_size = @ts.size last_update = Time.now - @ts.load_n_threads(@ts.size + n, opts) do |i| + @ts.load_n_threads(ts_to_load, opts) do |i| if (Time.now - last_update) >= 0.25 BufferManager.say "Loaded #{i.pluralize 'thread'} (use ^G to cancel)...", @mbid update @@ -495,8 +501,16 @@ EOS @interrupt_search = true end + def load_all_threads + load_threads :num => -1 + end + def load_threads opts={} - n = opts[:num] || ThreadIndexMode::LOAD_MORE_THREAD_NUM + if opts[:num].nil? + n = ThreadIndexMode::LOAD_MORE_THREAD_NUM + else + n = opts[:num] + end myopts = @load_thread_opts.merge({ :when_done => (lambda do |num| opts[:when_done].call(num) if opts[:when_done] diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb index 32002c4..09fbfbb 100644 --- a/lib/sup/thread.rb +++ b/lib/sup/thread.rb @@ -324,7 +324,7 @@ class ThreadSet ## load in (at most) num number of threads from the index def load_n_threads num, opts={} @index.each_id_by_date opts do |mid, builder| - break if size >= num + break if size >= num unless num == -1 next if contains_id? mid m = builder.call -- 1.5.3.7 From nicolas.pouillard@gmail.com Mon Jan 21 11:15:40 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Mon, 21 Jan 2008 17:15:40 +0100 Subject: [sup-talk] sup and gpg-agent Message-ID: <1200931947-sup-6993@ausone.inria.fr> Hi all, After giving to gpg my pass phrase (ncurses based), sup seems completely lost, arrow bindings no longer works... and I have to restart sup. I would like (at least if can't found the bug) have a command to reset terminal/curses stuffs... -- Nicolas Pouillard aka Ertai From wmorgan-sup@masanjin.net Mon Jan 21 21:36:48 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 21 Jan 2008 18:36:48 -0800 Subject: [sup-talk] header cache In-Reply-To: <1200581670-sup-9273@ausone.local> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> <1200519319-sup-915@clarabella.clarabella> <1200557516-sup-8444@ausone.local> <1200570003-sup-1529@clarabella.clarabella> <1200581670-sup-9273@ausone.local> Message-ID: <1200969359-sup-2816@south> Reformatted excerpts from nicolas.pouillard's message of 2008-01-17: > That's because Sup needs to compute a hash from file names to message > ids. Like IMAP headers, this is a one-time cost upon startup and could easily be cached. Maildir shouldn't be significantly slower than mbox except for this. -- William From wmorgan-sup@masanjin.net Mon Jan 21 21:49:26 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 21 Jan 2008 18:49:26 -0800 Subject: [sup-talk] [PATCH] renamed "quoteline" hook to "attribution" In-Reply-To: <1200591847-sup-3296@spooky.local> References: <1200313448-sup-3169@tomsk> <1200374341-sup-8557@south> <1200388608-sup-6945@tomsk> <1200389942-sup-6442@tomsk> <1200501059-sup-4520@spooky.local> <1200501489-sup-1907@tomsk> <1200517786-sup-7789@south> <1200591847-sup-3296@spooky.local> Message-ID: <1200970130-sup-9888@south> Applied, thanks. Anyone tracking next with a quoteline hook, you will have to rename the file. -- William From wmorgan-sup@masanjin.net Mon Jan 21 22:03:38 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 21 Jan 2008 19:03:38 -0800 Subject: [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits. In-Reply-To: <1200646334-sup-3256@archie> References: <1200646334-sup-3256@archie> Message-ID: <1200970931-sup-8284@south> Reformatted excerpts from its.jeff.balogh's message of 2008-01-18: > The size needs to be <= 7 digits to preserve sup's increasing id > requirement. Otherwise, large messages (probably w/ attachments) have > an id that is a magnitude larger than small messages. God, I was hoping no one would ever see this code. And I apparently forgot how printf works when writing it. Did this solve the problem you were having with Sup not noticing new Maildir messages? -- William From wmorgan-sup@masanjin.net Tue Jan 22 02:17:01 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 21 Jan 2008 23:17:01 -0800 Subject: [sup-talk] sup and gpg-agent In-Reply-To: <1200931947-sup-6993@ausone.inria.fr> References: <1200931947-sup-6993@ausone.inria.fr> Message-ID: <1200985659-sup-8098@south> Reformatted excerpts from nicolas.pouillard's message of 2008-01-21: > After giving to gpg my pass phrase (ncurses based), sup seems > completely lost, arrow bindings no longer works... and I have to > restart sup. Assuming you're talking about pinentry-curses, I see the same behavior too. I'm not sure how to fix it, or if it's even possible. It might be that pinentry-curses isn't restoring the console state to how it found it, it might be that Sup is supposed to be doing something different (but what? It's not notified when pinentry-curses is called). Someone who's a curses expert might know. My workaround was to install pinentry-gtk. :) -- William From wmorgan-sup@masanjin.net Tue Jan 22 02:41:43 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Mon, 21 Jan 2008 23:41:43 -0800 Subject: [sup-talk] sup crash on tab completion In-Reply-To: References: Message-ID: <1200987490-sup-7392@south> Hi John, Reformatted excerpts from John Bent's message of 2008-01-18: > I'm just trying out sup and I'm really excited about it so far. Great! > My deal is that I really like gmail but my work doesn't allow us to > use any external web servers so I can't forward my work email to > gmail. My work's webmail absolutely sucks so I want to run some > client on my own computer but I also want to use it when I'm on a > different computer. So I need something that works over X-windows or > in the console. I was using pine but I got completely frustrated by > the lack of search. Sounds like Sup is perfect for you. > I'm only just starting to mess with it and some things do seem a > little strange. For example, can I remove a label? You can remove labels by editing the labels for a thread. If you press 'l' while in a thread-index-mode, you can then backspace over any labels you don't want. > premature end of regular expression: /^John Bent (/ > /opt/local/lib/ruby/gems/1.8/gems/sup-0.3/lib/sup/buffer.rb:426:in > `ask_many_emails_with_completions' I have a fix for this that I've just applied to master. I've attached the patch below if you just want to update your local copy, or you can wait for the next release (any day now), or you can get the latest version form git. > Also, I can't figure out how to search on the from field. I'm doing > from:Username and getting an empty thing. Searcing on from: currently requires a full email address or a contact nickname. Hm, I should improve this. > Also, can I automatically archive sent-messages that aren't part of a > thread that includes received messages? I'm not sure I entirely understand. Currently, sent messages appear in your inbox. Do you want sent messages to instead be archived automatically, unless they're part of a thread that already appears in your inbox? If so, this would be a pretty easy change, and possibly worthy of a config option. Here's the patch that fixes tab completion: --- lib/sup/buffer.rb | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb index 2a78787..4374fa8 100644 --- a/lib/sup/buffer.rb +++ b/lib/sup/buffer.rb @@ -398,7 +398,7 @@ EOS def ask_with_completions domain, question, completions, default=nil ask domain, question, default do |s| - completions.select { |x| x =~ /^#{s}/i }.map { |x| [x, x] } + completions.select { |x| x =~ /^#{Regexp::escape s}/i }.map { |x| [x, x] } end end @@ -414,7 +414,7 @@ EOS raise "william screwed up completion: #{partial.inspect}" end - completions.select { |x| x =~ /^#{target}/i }.map { |x| [prefix + x, x] } + completions.select { |x| x =~ /^#{Regexp::escape target}/i }.map { |x| [prefix + x, x] } end end @@ -423,7 +423,7 @@ EOS prefix, target = partial.split_on_commas_with_remainder target ||= prefix.pop || "" prefix = prefix.join(", ") + (prefix.empty? ? "" : ", ") - completions.select { |x| x =~ /^#{target}/i }.map { |x| [prefix + x, x] } + completions.select { |x| x =~ /^#{Regexp::escape target}/i }.map { |x| [prefix + x, x] } end end @@ -436,7 +436,7 @@ EOS if dir [[s.sub(full, dir), "~#{name}"]] else - users.select { |u| u =~ /^#{name}/ }.map do |u| + users.select { |u| u =~ /^#{Regexp::escape name}/ }.map do |u| [s.sub("~#{name}", "~#{u}"), "~#{u}"] end end -- 1.5.4.rc2.69.g10f0 -- William From wmorgan-sup@masanjin.net Tue Jan 22 03:04:19 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 22 Jan 2008 00:04:19 -0800 Subject: [sup-talk] 0.4 release plans and git comments Message-ID: <1200987860-sup-9887@south> Hi all, There've been enough bug fixes and other changes that I'm going to try to push 0.4 out the door over the next few days. I'll try and give a report of what features are in and which are still percolating in next. I realize now that I've been using Git wrong---I've been maintaining features as branches off of next, which has the effect that I can't easily merge a "topic" over to master without also merging in everything else that happened to be merged into next at an earlier point. So this might be a little messy. (But I've learned my lesson!) The upshot is that, if you submit a patches, it should typically be cut against master, not against next. (I'll update the wiki to reflect this.) Then I can merge topics into next just as before, but there's no false dependence between features introduced by Git. -- William From nicolas.pouillard@gmail.com Tue Jan 22 03:22:32 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 22 Jan 2008 09:22:32 +0100 Subject: [sup-talk] sup and gpg-agent In-Reply-To: <1200985659-sup-8098@south> References: <1200931947-sup-6993@ausone.inria.fr> <1200985659-sup-8098@south> Message-ID: <1200990103-sup-9355@ausone.local> Excerpts from William Morgan's message of Tue Jan 22 08:17:01 +0100 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-01-21: > > After giving to gpg my pass phrase (ncurses based), sup seems > > completely lost, arrow bindings no longer works... and I have to > > restart sup. > > Assuming you're talking about pinentry-curses, I see the same behavior > too. I'm not sure how to fix it, or if it's even possible. It might be > that pinentry-curses isn't restoring the console state to how it found > it, it might be that Sup is supposed to be doing something different > (but what? It's not notified when pinentry-curses is called). Someone > who's a curses expert might know. > > My workaround was to install pinentry-gtk. :) You're right, this *workaround* works for me too :) -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 186 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080122/ad8bfe3e/attachment-0001.bin From nicolas.pouillard@gmail.com Tue Jan 22 03:40:05 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 22 Jan 2008 09:40:05 +0100 Subject: [sup-talk] header cache In-Reply-To: <1200969359-sup-2816@south> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> <1200519319-sup-915@clarabella.clarabella> <1200557516-sup-8444@ausone.local> <1200570003-sup-1529@clarabella.clarabella> <1200581670-sup-9273@ausone.local> <1200969359-sup-2816@south> Message-ID: <1200990925-sup-1529@ausone.local> Excerpts from William Morgan's message of Tue Jan 22 03:36:48 +0100 2008: > Reformatted excerpts from nicolas.pouillard's message of 2008-01-17: > > That's because Sup needs to compute a hash from file names to message > > ids. > > Like IMAP headers, this is a one-time cost upon startup and could easily > be cached. Maildir shouldn't be significantly slower than mbox except > for this. Looking at the code 'scan_mailbox' seems to be called quite often (but not more than every 30 seconds). I'm wondering if peeking a file in a very large directory is as fast as seeking to a particular offset in a large file? -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 186 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080122/41112479/attachment.bin From marcus-sup@bar-coded.net Tue Jan 22 04:40:57 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Tue, 22 Jan 2008 09:40:57 +0000 Subject: [sup-talk] sup crash on tab completion In-Reply-To: <1200987490-sup-7392@south> References: <1200987490-sup-7392@south> Message-ID: <1200994656-sup-4998@tomsk> On 22.1.2008, William Morgan wrote: > > Also, I can't figure out how to search on the from field. I'm doing > > from:Username and getting an empty thing. > > Searcing on from: currently requires a full email address or a contact > nickname. Hm, I should improve this. Note that you can use wildcards... "from:joe*" will find emails from joey/joe.bloggs/joel etc. Although it must be said I was pondering yesterday whether it was possible to get searches assume wildcards some how so when you searched for from:joe you would actually be searching for from:*joe* or maybe from:joe* automagically. I dug around in the ferret docs to see if this was possible but only came up with the fuzzy operators and you might as well use a wildcard instead. Marcus From its.jeff.balogh@gmail.com Tue Jan 22 09:01:37 2008 From: its.jeff.balogh@gmail.com (Jeff Balogh) Date: Tue, 22 Jan 2008 09:01:37 -0500 Subject: [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits. In-Reply-To: <1200970931-sup-8284@south> References: <1200646334-sup-3256@archie> <1200970931-sup-8284@south> Message-ID: <1201010230-sup-3444@archie> William Morgan wrote: > Reformatted excerpts from its.jeff.balogh's message of 2008-01-18: > > The size needs to be <= 7 digits to preserve sup's increasing id > > requirement. Otherwise, large messages (probably w/ attachments) have > > an id that is a magnitude larger than small messages. > > God, I was hoping no one would ever see this code. And I apparently > forgot how printf works when writing it. > > Did this solve the problem you were having with Sup not noticing new > Maildir messages? Yes, Sup works for me with Maildir. -- jeff From johnbent@lanl.gov Tue Jan 22 11:40:05 2008 From: johnbent@lanl.gov (John Bent) Date: Tue, 22 Jan 2008 09:40:05 -0700 Subject: [sup-talk] missing run-mailcap Message-ID: <1201019996-sup-8960@tangerine.lanl.gov> I saw some earlier discussion in the list archives about a missing run-mailcap script. I had this same problem too on my mac (10.4.11 Power PC). It's sort of a kluge but I dealt with this by writing my own /usr/bin/run-mailcap which just does a simple hash lookup of mime type to rename the file with an appropriate extension and then uses the mac 'open' command. I haven't fully populated the hash table yet; I'll do that lazily. If the 'file' command could return an extension, I'd be tempted to use it and avoid the hash table but the best it can do is return the mime-type which we already know. Or if there was some way to pass the mime-type to the 'open' command, that'd be better too. But at least this works... =========================================================================== #! /usr/bin/perl my %mimes = ( 'image/jpeg' => 'jpg', 'text/html' => 'html', ); my ( $type, $file ) = split( /:/, $ARGV[1] ); Log( "$type - $file\n" ); my $extension = $mimes{$type}; if ( ! defined $extension ) { Log( "Unknown type $type\n" ); } else { rename( $file, "$file.$extension" ); Log( "open $file.$extension\n" ); system( "open $file.$extension" ); } ####################################################################### my $log_fd; sub Log { if ( ! defined $log_fd ) { open LOG, ">>/tmp/mailcap.log" or warn "open log: $!\n"; $log_fd = \*LOG; } #print "@_"; print LOG "@_"; } From marcus-sup@bar-coded.net Tue Jan 22 15:44:47 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Tue, 22 Jan 2008 20:44:47 +0000 Subject: [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits. In-Reply-To: <1200970931-sup-8284@south> References: <1200646334-sup-3256@archie> <1200970931-sup-8284@south> Message-ID: <1201034511-sup-3452@tomsk> On 22.1.2008, William Morgan wrote: > God, I was hoping no one would ever see this code. And I apparently > forgot how printf works when writing it. :) Why do you use mtime + filesize rather than just the filename (before the colon) as the id? Other than the flags on files (after the colon) does this ever change? Marcus From johnbent@lanl.gov Tue Jan 22 17:33:22 2008 From: johnbent@lanl.gov (John Bent) Date: Tue, 22 Jan 2008 15:33:22 -0700 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201019996-sup-8960@tangerine.lanl.gov> References: <1201019996-sup-8960@tangerine.lanl.gov> Message-ID: <1201041081-sup-6034@tangerine.lanl.gov> Excerpts from John Bent's message of Tue Jan 22 09:40:05 -0700 2008: > I saw some earlier discussion in the list archives about a missing run-mailcap > script. I had this same problem too on my mac (10.4.11 Power PC). It's sort > of a kluge but I dealt with this by writing my own /usr/bin/run-mailcap which > just does a simple hash lookup of mime type to rename the file with an > appropriate extension and then uses the mac 'open' command. I haven't fully > populated the hash table yet; I'll do that lazily. If the 'file' command > could return an extension, I'd be tempted to use it and avoid the hash table > but the best it can do is return the mime-type which we already know. Or if > there was some way to pass the mime-type to the 'open' command, that'd be > better too. But at least this works... > Here's a cleaner version that doesn't have anything hard-coded but relies on the 'find' command and the MIME::Types perl module: ============================================================================ #! /opt/local/bin/perl use MIME::Types; my ( $type, $file ) = split( /:/, $ARGV[1] ); if ( $type eq 'application/octet-stream' ) { $type = findType( $file ); } my $extension = findExtension( $type ); my $newfile = "$file.$extension"; my $command = "open $newfile"; rename( $file, $newfile ); Log( "Extension for $type is $extension -> $command\n" ); system( $command ); ####################################################################### sub findExtension { my $mimetypes = MIME::Types->new; my MIME::Type $mimetype = $mimetypes->type($type); my @extensions = $mimetype->extensions; return $extensions[0]; } sub findType { my $file = shift; my $type = `file -i -b $file`; chomp( $type ); return $type; } my $log_fd; sub Log { if ( ! defined $log_fd ) { open LOG, ">>/tmp/mailcap.log" or warn "open log: $!\n"; $log_fd = \*LOG; } #print "@_"; print LOG "@_"; } From wmorgan-sup@masanjin.net Wed Jan 23 00:20:16 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 22 Jan 2008 21:20:16 -0800 Subject: [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits. In-Reply-To: <1201034511-sup-3452@tomsk> References: <1200646334-sup-3256@archie> <1200970931-sup-8284@south> <1201034511-sup-3452@tomsk> Message-ID: <1201065536-sup-7142@south> Reformatted excerpts from Marcus Williams's message of 2008-01-22: > :) Why do you use mtime + filesize rather than just the filename > (before the colon) as the id? Other than the flags on files (after the > colon) does this ever change? Exactly the type of question man was not meant to ask. The short answer is: because maildir filenames, while unique, are not integers, and Sup needs integers. The long answer is: in order to have a mailstore-format-indepedent way of keeping track of messages that haven't been added to the index (as opposed to messages which the mailstore thinks are unread, which is a different question entirely), Sup uses message identifiers that are unique, increasing, but not necessarily continguous, integers. Then Sup can keep track of the last id that was added to the index for each source, and polling consists of simply adding messages for which the id is greater than the last id that Sup added from that source. The other way to do this would be to have each source type maintain its own logic for returning which messages hadn't been added to the index. That could have been implemented by either pawing through the index upon startup for each message (unacceptably slow for large mailstores), or by maintaining a separate listing of added messages (probably very large and seems a bit silly). The terrible part about this solution, of course, is that Sup can't uniquely represent two messages that have the same mtime and the same size. One day I'm sure this will cause pain. -- William From wmorgan-sup@masanjin.net Wed Jan 23 00:20:38 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 22 Jan 2008 21:20:38 -0800 Subject: [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits. In-Reply-To: <1201010230-sup-3444@archie> References: <1200646334-sup-3256@archie> <1200970931-sup-8284@south> <1201010230-sup-3444@archie> Message-ID: <1201065624-sup-4708@south> Reformatted excerpts from its.jeff.balogh's message of 2008-01-22: > Yes, Sup works for me with Maildir. Ok, this patch is in both master and next. -- William From wmorgan-sup@masanjin.net Wed Jan 23 01:42:15 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 22 Jan 2008 22:42:15 -0800 Subject: [sup-talk] 0.4 release plans and git comments In-Reply-To: <1200987860-sup-9887@south> References: <1200987860-sup-9887@south> Message-ID: <1201070427-sup-2914@south> Reformatted excerpts from William Morgan's message of 2008-01-22: > There've been enough bug fixes and other changes that I'm going to try > to push 0.4 out the door over the next few days. I'll try and give a > report of what features are in and which are still percolating in > next. Everything that was applied to next is now in master. 0.4 release imminent! > The upshot is that, if you submit a patches, it should typically be > cut against master, not against next. (I'll update the wiki to reflect > this.) Then I can merge topics into next just as before, but there's > no false dependence between features introduced by Git. I've updated the wiki with better Git instructions. -- William From wmorgan-sup@masanjin.net Wed Jan 23 02:09:10 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 22 Jan 2008 23:09:10 -0800 Subject: [sup-talk] sup crash on tab completion In-Reply-To: <1200994656-sup-4998@tomsk> References: <1200987490-sup-7392@south> <1200994656-sup-4998@tomsk> Message-ID: <1201072070-sup-2323@south> Reformatted excerpts from Marcus Williams's message of 2008-01-22: > Note that you can use wildcards... "from:joe*" will find emails from > joey/joe.bloggs/joel etc. Wow, I totally forgot about that. > Although it must be said I was pondering yesterday whether it was > possible to get searches assume wildcards some how so when you > searched for from:joe you would actually be searching for from:*joe* > or maybe from:joe* automagically. I dug around in the ferret docs to > see if this was possible but only came up with the fuzzy operators and > you might as well use a wildcard instead. I don't recall seeing anything like this in the Ferret docs, so it's probably not possible. What I'm thinking of doing, which will kind of approximate this, is adding the LHS of the email address and the sender's name to the from: field at index time, so that email from you would match e.g. from:marcus, from:williams, and from:marcus-sup. -- William From rgh@roughage.com.au Wed Jan 23 01:57:03 2008 From: rgh@roughage.com.au (Richard Heycock) Date: Wed, 23 Jan 2008 17:57:03 +1100 Subject: [sup-talk] 0.4 release plans and git comments In-Reply-To: <1201070427-sup-2914@south> References: <1200987860-sup-9887@south> <1201070427-sup-2914@south> Message-ID: <1201071368-sup-3588@wrasse> Excerpts from William Morgan's message of Wed Jan 23 17:42:15 +1100 2008: > Reformatted excerpts from William Morgan's message of 2008-01-22: > > There've been enough bug fixes and other changes that I'm going to try > > to push 0.4 out the door over the next few days. I'll try and give a > > report of what features are in and which are still percolating in > > next. > > Everything that was applied to next is now in master. 0.4 release > imminent! And the release notes ... :-) By the way I've just started using sup. Lovin' it! rgh > > The upshot is that, if you submit a patches, it should typically be > > cut against master, not against next. (I'll update the wiki to reflect > > this.) Then I can merge topics into next just as before, but there's > > no false dependence between features introduced by Git. > > I've updated the wiki with better Git instructions. > -- 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 marcus-sup@bar-coded.net Wed Jan 23 04:59:54 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Wed, 23 Jan 2008 09:59:54 +0000 Subject: [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits. In-Reply-To: <1201065536-sup-7142@south> References: <1200646334-sup-3256@archie> <1200970931-sup-8284@south> <1201034511-sup-3452@tomsk> <1201065536-sup-7142@south> Message-ID: <1201081580-sup-6798@tomsk> On 23.1.2008, William Morgan wrote: > Reformatted excerpts from Marcus Williams's message of 2008-01-22: > > :) Why do you use mtime + filesize rather than just the filename > > (before the colon) as the id? Other than the flags on files (after the > > colon) does this ever change? > > Exactly the type of question man was not meant to ask. :) > The terrible part about this solution, of course, is that Sup can't > uniquely represent two messages that have the same mtime and the same > size. One day I'm sure this will cause pain. If you store the id in the ferret index, is it quick enough just to use ferret to tell you if its there? That way an id could be a string and could be tracked by the source via ferret (a source would just have to guarantee its unique when combined with the source id). Off on a slight tangent - I cant get any maildir working with sup here. I added a maildir to my sources list and it gets scanned as expected but nothing gets into the index. I'm wondering whether this is as a result of the id function. Marcus From grant@antiflux.org Wed Jan 23 07:41:58 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Wed, 23 Jan 2008 07:41:58 -0500 Subject: [sup-talk] sup crash on tab completion In-Reply-To: <1201072070-sup-2323@south> References: <1200987490-sup-7392@south> <1200994656-sup-4998@tomsk> <1201072070-sup-2323@south> Message-ID: <1201092080-sup-1011@spooky.local> * William Morgan [Wed Jan 23 02:09:10 -0500 2008]: > I don't recall seeing anything like this in the Ferret docs, so it's > probably not possible. What I'm thinking of doing, which will kind of > approximate this, is adding the LHS of the email address and the > sender's name to the from: field at index time, so that email from you > would match e.g. from:marcus, from:williams, and from:marcus-sup. That would be excellent. I try to search like that all the time. From wmorgan-sup@masanjin.net Wed Jan 23 13:14:53 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 23 Jan 2008 10:14:53 -0800 Subject: [sup-talk] [ANN] Sup 0.4 released Message-ID: <1201112082-sup-9754@south> Sup version 0.4 has been released! http://sup.rubyforge.org 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.4 / 2008-01-23 * GPG support for signing and encrypting outgoing mail * New hooks: mime attachment, attribution line * Improved local charset detection using gettext library * Better quoted region detection * Many bugfixes and UI improvements -- William From wmorgan-sup@masanjin.net Wed Jan 23 13:18:41 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 23 Jan 2008 10:18:41 -0800 Subject: [sup-talk] 0.4 release plans and git comments In-Reply-To: <1201071368-sup-3588@wrasse> References: <1200987860-sup-9887@south> <1201070427-sup-2914@south> <1201071368-sup-3588@wrasse> Message-ID: <1201112273-sup-2410@south> Reformatted excerpts from Richard Heycock's message of 2008-01-22: > And the release notes ... In the announcement, in History.txt, and on the website now. > By the way I've just started using sup. Lovin' it! Great to hear! -- William From wmorgan-sup@masanjin.net Wed Jan 23 13:22:11 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 23 Jan 2008 10:22:11 -0800 Subject: [sup-talk] [PATCH] Show drafts in red, in thread-index-mode. In-Reply-To: <12006503991760-git-send-email-nicolas.pouillard@gmail.com> References: <12006503991760-git-send-email-nicolas.pouillard@gmail.com> Message-ID: <1201112451-sup-5510@south> Reformatted excerpts from nicolas.pouillard's message of 2008-01-18: > This patch would help to think about finishing drafts. I like it. There's trailing whitespace on the c.add line. After that I'm happy to apply it. -- William From wmorgan-sup@masanjin.net Wed Jan 23 14:15:35 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 23 Jan 2008 11:15:35 -0800 Subject: [sup-talk] [PATCH] Add ability to interrupt current thread operation (search) In-Reply-To: <1200769080-sup-4420@tomsk> References: <1200768101-sup-3312@tomsk> <1200768474-sup-7396@tomsk> <1200769080-sup-4420@tomsk> Message-ID: <1201114113-sup-1607@south> Reformatted excerpts from Marcus Williams's message of 2008-01-19: > This adds the ability to stop the current threading operation. This is > usually a search, but its anything that ends up calling load_n_threads > in thread-index-view. The user can hit ctrl-g to stop the operation. This looks great. I have a mild preference for not changing the messages, and there just being a general expectation of ^G being a cancelling key in Sup like it is in Emacs, but I'm open to suggestion by others. I'm merging this into next and we can all meditate on it. I'm slowly working my way through the other patches, so have patience, everyone. -- William From gsf@fruct.us Wed Jan 23 14:25:21 2008 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Wed, 23 Jan 2008 14:25:21 -0500 Subject: [sup-talk] sup crash on tab completion In-Reply-To: <1201072070-sup-2323@south> References: <1200987490-sup-7392@south> <1200994656-sup-4998@tomsk> <1201072070-sup-2323@south> Message-ID: <20080123192521.GA30955@manheim.library.drexel.edu> On Tue, Jan 22, 2008 at 11:09:10PM -0800, William Morgan wrote: > Reformatted excerpts from Marcus Williams's message of 2008-01-22: > > Note that you can use wildcards... "from:joe*" will find emails from > > joey/joe.bloggs/joel etc. > > Wow, I totally forgot about that. > > > Although it must be said I was pondering yesterday whether it was > > possible to get searches assume wildcards some how so when you > > searched for from:joe you would actually be searching for from:*joe* > > or maybe from:joe* automagically. I dug around in the ferret docs to > > see if this was possible but only came up with the fuzzy operators and > > you might as well use a wildcard instead. > > I don't recall seeing anything like this in the Ferret docs, so it's > probably not possible. What I'm thinking of doing, which will kind of > approximate this, is adding the LHS of the email address and the > sender's name to the from: field at index time, so that email from you > would match e.g. from:marcus, from:williams, and from:marcus-sup. Using Ferret's LetterAnalyzer on the "from" and "to" fields should do this for you (i.e., create the appropriate tokens). I've stuck it in the code, but I haven't been able to make it work. Something to do with the twice-over query parsing, I think. gsf From rgh@roughage.com.au Wed Jan 23 15:10:48 2008 From: rgh@roughage.com.au (Richard Heycock) Date: Thu, 24 Jan 2008 07:10:48 +1100 Subject: [sup-talk] gem dependency for sup 0.4 Message-ID: <1201118863-sup-4011@wrasse> I upgraded to version 0.4 this morning using the gem and it didn't pull in the gettext gem. I guess the gem doesn't include gettext as a dependency. On a slightly different note is there a bug tracker for sup? rgh -- 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 marcus-sup@bar-coded.net Wed Jan 23 15:14:23 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Wed, 23 Jan 2008 20:14:23 +0000 Subject: [sup-talk] [PATCH] Add ability to interrupt current thread operation (search) In-Reply-To: <1201114113-sup-1607@south> References: <1200768101-sup-3312@tomsk> <1200768474-sup-7396@tomsk> <1200769080-sup-4420@tomsk> <1201114113-sup-1607@south> Message-ID: <1201119167-sup-8440@tomsk> On 23.1.2008, William Morgan wrote: > Reformatted excerpts from Marcus Williams's message of 2008-01-19: > > This adds the ability to stop the current threading operation. This is > > usually a search, but its anything that ends up calling load_n_threads > > in thread-index-view. The user can hit ctrl-g to stop the operation. > > This looks great. I have a mild preference for not changing the > messages, and there just being a general expectation of ^G being a > cancelling key in Sup like it is in Emacs, but I'm open to suggestion by > others. My feeling was it wasnt obvious that you could cancel the operation without it. If there was some way of making that more obvious somewhere then the message could be removed. I didnt even realise I could use ^G elsewhere until fairly recently! Marcus From johnbent@lanl.gov Wed Jan 23 15:22:25 2008 From: johnbent@lanl.gov (John Bent) Date: Wed, 23 Jan 2008 13:22:25 -0700 Subject: [sup-talk] debugging hooks Message-ID: <1201119592-sup-2472@tangerine.lanl.gov> I seem to have a ruby bug in my before-add-message.rb hook. When new messages are loaded, I see a very quickly displayed error message about the hook. Is this same error written to a file anywhere because it flashes too quickly for me to read it? I tried just directly executing the before-add-message.rb code with ruby but of course it complains that message is undefined. What is the best way to debug hooks? Thanks, John From gsf@fruct.us Wed Jan 23 15:33:07 2008 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Wed, 23 Jan 2008 15:33:07 -0500 Subject: [sup-talk] header cache In-Reply-To: <1200990925-sup-1529@ausone.local> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> <1200519319-sup-915@clarabella.clarabella> <1200557516-sup-8444@ausone.local> <1200570003-sup-1529@clarabella.clarabella> <1200581670-sup-9273@ausone.local> <1200969359-sup-2816@south> <1200990925-sup-1529@ausone.local> Message-ID: <20080123203307.GA31494@manheim.library.drexel.edu> On Tue, Jan 22, 2008 at 09:40:05AM +0100, Nicolas Pouillard wrote: > Excerpts from William Morgan's message of Tue Jan 22 03:36:48 +0100 2008: > > Reformatted excerpts from nicolas.pouillard's message of 2008-01-17: > > > That's because Sup needs to compute a hash from file names to message > > > ids. > > > > Like IMAP headers, this is a one-time cost upon startup and could easily > > be cached. Maildir shouldn't be significantly slower than mbox except > > for this. > > Looking at the code 'scan_mailbox' seems to be called quite often (but not > more than every 30 seconds). > > I'm wondering if peeking a file in a very large directory is as fast as > seeking to a particular offset in a large file? If you're really interested in speed comparisons between mbox and maildir, http://www.courier-mta.org/mbox-vs-maildir/ is a good read. From wmorgan-sup@masanjin.net Wed Jan 23 15:51:46 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 23 Jan 2008 12:51:46 -0800 Subject: [sup-talk] debugging hooks In-Reply-To: <1201119592-sup-2472@tangerine.lanl.gov> References: <1201119592-sup-2472@tangerine.lanl.gov> Message-ID: <1201121439-sup-4455@south> Reformatted excerpts from John Bent's message of 2008-01-23: > I seem to have a ruby bug in my before-add-message.rb hook. When new > messages are loaded, I see a very quickly displayed error message > about the hook. Is this same error written to a file anywhere because > it flashes too quickly for me to read it? The messages should be reproduced in the log buffer. If you hit B you can bring it up directly. -- William From gsf@fruct.us Wed Jan 23 16:13:18 2008 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Wed, 23 Jan 2008 16:13:18 -0500 Subject: [sup-talk] return-path Message-ID: <20080123211318.GB31529@manheim.library.drexel.edu> I'm writing this message in mutt instead of sup because I send my email via a postfix relay-host and mutt allows me to set my Return-Path equal to my "From:" address with "set envelope_from=yes". If I don't do this, my email is often rejected from mailing lists. I believe other email clients default to this behavior (see http://www.mail-archive.com/mutt-users at mutt.org/msg26743.html for the post I'm basing my assumption on). Could sup follow that, or at least allow the option? I imagine the fix for this would go in edit-message-mode.rb, but my ruby skills aren't quite there yet. gsf (a pythonista, mostly) From johnbent@lanl.gov Wed Jan 23 16:25:54 2008 From: johnbent@lanl.gov (John Bent) Date: Wed, 23 Jan 2008 14:25:54 -0700 Subject: [sup-talk] debugging hooks In-Reply-To: <1201121439-sup-4455@south> References: <1201119592-sup-2472@tangerine.lanl.gov> <1201121439-sup-4455@south> Message-ID: <1201123436-sup-8771@tangerine.lanl.gov> Excerpts from William Morgan's message of Wed Jan 23 13:51:46 -0700 2008: > Reformatted excerpts from John Bent's message of 2008-01-23: > > I seem to have a ruby bug in my before-add-message.rb hook. When new > > messages are loaded, I see a very quickly displayed error message > > about the hook. Is this same error written to a file anywhere because > > it flashes too quickly for me to read it? > > The messages should be reproduced in the log buffer. If you hit B you > can bring it up directly. > That did the trick. Thanks a lot. And thanks again for sup. I'm so happy to finally say good-bye to pine; I feel like I've finally entered the correct century in terms of my email technology. From wmorgan-sup@masanjin.net Wed Jan 23 17:01:59 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 23 Jan 2008 14:01:59 -0800 Subject: [sup-talk] debugging hooks In-Reply-To: <1201123436-sup-8771@tangerine.lanl.gov> References: <1201119592-sup-2472@tangerine.lanl.gov> <1201121439-sup-4455@south> <1201123436-sup-8771@tangerine.lanl.gov> Message-ID: <1201125657-sup-8715@south> Reformatted excerpts from John Bent's message of 2008-01-23: > That did the trick. Thanks a lot. And thanks again for sup. I'm so > happy to finally say good-bye to pine; I feel like I've finally > entered the correct century in terms of my email technology. Well I wouldn't go that far. You're still using a console program, after all. :) -- William From wmorgan-sup@masanjin.net Wed Jan 23 17:12:07 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 23 Jan 2008 14:12:07 -0800 Subject: [sup-talk] return-path In-Reply-To: <20080123211318.GB31529@manheim.library.drexel.edu> References: <20080123211318.GB31529@manheim.library.drexel.edu> Message-ID: <1201125726-sup-1297@south> Reformatted excerpts from Gabriel Sean Farrell's message of 2008-01-23: > I'm writing this message in mutt instead of sup because I send my > email via a postfix relay-host and mutt allows me to set my > Return-Path equal to my "From:" address with "set envelope_from=yes". > If I don't do this, my email is often rejected from mailing lists. > > I believe other email clients default to this behavior (see > http://www.mail-archive.com/mutt-users at mutt.org/msg26743.html for the > post I'm basing my assumption on). Could sup follow that, or at least > allow the option? The Sup way to do this is to have the following line in your ~/.sup/hooks/before-edit.rb: header["Return-Path"] = header["From"] Unfortunately, you have to apply the following patch or Sup simply discards that header. There's a better solution, which is to make Sup not discard any headers set by the user when composing email, and I will take it as a bugfix task to implement that for the next release. diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb index 0ce52fe..55dd44f 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, + /^(Return-Path):\s+(.*?)\s*$/i, /^(Status):\s+(.*?)\s*$/i: header[last = $1] = $2 when /^(Message-Id):\s+(.*?)\s*$/i: header[mid_field = last = $1] = $2 -- William From gsf@fruct.us Wed Jan 23 17:47:12 2008 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Wed, 23 Jan 2008 17:47:12 -0500 Subject: [sup-talk] return-path In-Reply-To: <1201125726-sup-1297@south> References: <20080123211318.GB31529@manheim.library.drexel.edu> <1201125726-sup-1297@south> Message-ID: <20080123224712.GB32356@manheim.library.drexel.edu> On Wed, Jan 23, 2008 at 02:12:07PM -0800, William Morgan wrote: > Reformatted excerpts from Gabriel Sean Farrell's message of 2008-01-23: > > I'm writing this message in mutt instead of sup because I send my > > email via a postfix relay-host and mutt allows me to set my > > Return-Path equal to my "From:" address with "set envelope_from=yes". > > If I don't do this, my email is often rejected from mailing lists. > > > > I believe other email clients default to this behavior (see > > http://www.mail-archive.com/mutt-users at mutt.org/msg26743.html for the > > post I'm basing my assumption on). Could sup follow that, or at least > > allow the option? > > The Sup way to do this is to have the following line in your > ~/.sup/hooks/before-edit.rb: > header["Return-Path"] = header["From"] > > Unfortunately, you have to apply the following patch or Sup simply > discards that header. There's a better solution, which is to make Sup > not discard any headers set by the user when composing email, and I will > take it as a bugfix task to implement that for the next release. > > diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb > index 0ce52fe..55dd44f 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, > + /^(Return-Path):\s+(.*?)\s*$/i, > /^(Status):\s+(.*?)\s*$/i: header[last = $1] = $2 > when /^(Message-Id):\s+(.*?)\s*$/i: header[mid_field = last = $1] = $2 I've added the line and applied the patch. Now I see "Return-Path" in the headers of my message before I send it, but when I receive it the return-path is still the one I was trying to override. Could the one I set still be getting stripped out? From johnbent@lanl.gov Wed Jan 23 18:12:37 2008 From: johnbent@lanl.gov (John Bent) Date: Wed, 23 Jan 2008 16:12:37 -0700 Subject: [sup-talk] archived threads not returning to inbox Message-ID: <1201129847-sup-6955@tangerine.lanl.gov> I'm running sup-0.4 since this morning and I've noticed that archived threads that get new messages are not reappearing in my inbox. I do see the expected message: Loaded 1 new message, 1 to inbox. but the thread doesn't reappear. If I quit and restart sup, then the thread does correctly reappear in the inbox. I thought I was noticing this with other threads so to test, I used my gmail account, sent a message to sup, received and archived it, and then replied to it again with my gmail account. From grant@antiflux.org Wed Jan 23 19:07:12 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Wed, 23 Jan 2008 19:07:12 -0500 Subject: [sup-talk] archived threads not returning to inbox In-Reply-To: <1201129847-sup-6955@tangerine.lanl.gov> References: <1201129847-sup-6955@tangerine.lanl.gov> Message-ID: <1201133186-sup-902@spooky.local> * John Bent [Wed Jan 23 18:12:37 -0500 2008]: > I'm running sup-0.4 since this morning and I've noticed that archived > threads that get new messages are not reappearing in my inbox. I do > see the expected message: Loaded 1 new message, 1 to inbox. but the thread > doesn't reappear. If I quit and restart sup, then the thread does correctly > reappear in the inbox. Sup needs some work still on keeping buffers up to date. Try hitting '@' to refresh your inbox. From sho.fukamachi@gmail.com Thu Jan 24 03:11:48 2008 From: sho.fukamachi@gmail.com (Sho Fukamachi) Date: Thu, 24 Jan 2008 19:11:48 +1100 Subject: [sup-talk] NoMethodError running sup-config Message-ID: Hi all, Thought I'd try out sup but get a crash trying to configure: ------------------------ [Thu Jan 24 18:42:10 +1100 2008] unlocking /Users/sho/.sup/lock... /Library/Ruby/Gems/1.8/gems/sup-0.4/lib/sup/mbox/loader.rb:25:in `initialize': undefined method `path' for # (NoMethodError) from /Library/Ruby/Gems/1.8/gems/sup-0.4/lib/sup/mbox/ssh-loader.rb: 29:in `new' from /Library/Ruby/Gems/1.8/gems/sup-0.4/lib/sup/mbox/ssh-loader.rb: 29:in `initialize' from /Library/Ruby/Gems/1.8/gems/sup-0.4/bin/sup-add:103:in `new' from /Library/Ruby/Gems/1.8/gems/sup-0.4/bin/sup-add:103 from /Library/Ruby/Gems/1.8/gems/sup-0.4/bin/sup-add:87:in `each' from /Library/Ruby/Gems/1.8/gems/sup-0.4/bin/sup-add:87 from /usr/bin/sup-add:19:in `load' from /usr/bin/sup-add:19 Rats, that failed. You may have to do it manually. Try again? (enter for "n"): --------------------- As you can probably see, it's MacOSX 10.5.1. gettext was manually installed. I was trying to add a new remote mbox, the path I gave was mydomain.com/var/spool/mail/my_mbox. I tried with and without the leading slash in the remote server path, crashed both times. I realise it's probably something dumb I'm doing but I did try a couple of times. Any clues? thanks! Sho -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2429 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080124/490de6fc/attachment.bin From daniel@wagner-home.com Thu Jan 24 03:50:30 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Thu, 24 Jan 2008 00:50:30 -0800 Subject: [sup-talk] indexed, but not Message-ID: <1201164353-sup-1929@buckwheat> Hello hello! Nice job on sup, I'm loving it so far. I've managed to get myself into a bit of a strange situation, it seems. I've received a mail into a Maildir, and I can see the mail with, eg, vim. But, it doesn't appear in sup. Now, the odd thing is that it seems to be indexed. If I use '\' to search for "death", I get one thread returned, but none of the messages in that thread contain the word "death"! I've tried sup-sync -c on that source, but no joy. Any ideas? ~d From johnbent@lanl.gov Thu Jan 24 16:40:08 2008 From: johnbent@lanl.gov (John Bent) Date: Thu, 24 Jan 2008 14:40:08 -0700 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201041081-sup-6034@tangerine.lanl.gov> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> Message-ID: <1201210323-sup-6116@tangerine.lanl.gov> Excerpts from John Bent's message of Tue Jan 22 15:33:22 -0700 2008: > Excerpts from John Bent's message of Tue Jan 22 09:40:05 -0700 2008: > > I saw some earlier discussion in the list archives about a missing run-mailcap > > script. I had this same problem too on my mac (10.4.11 Power PC). It's sort > > of a kluge but I dealt with this by writing my own /usr/bin/run-mailcap which > > just does a simple hash lookup of mime type to rename the file with an > > appropriate extension and then uses the mac 'open' command. When sup opens an attachment, it copies the attachment to /tmp/sup-attachment-ID and then calls run-mailcap. But sup knows what name the file was attached as. Could sup save the attachment to /tmp/filename? Or at least append the extension? Although my preference would be to use the fullname which is presumably what the file is named on the originating machine. Often I'll open an attachment first and if I like it, then I'll save it using whichever viewer it's in (e.g. someone sends me an MS Word, I open it in word, and then save it through word). I then get a dialog about how to save it which has as a starting point the current path which is /tmp/sup-attachment-ID which I'll always have to change. But if it was the original attached name, I'd probably often be happy and would prefer to keep that name. By the way, sup works so well that I've now imported my old school emails which I'd previously given up on. I now have blazing fast search over my last ten years of email! From wmorgan-sup@masanjin.net Thu Jan 24 18:26:20 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 15:26:20 -0800 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201210323-sup-6116@tangerine.lanl.gov> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> Message-ID: <1201216741-sup-4105@south> Reformatted excerpts from John Bent's message of 2008-01-24: > When sup opens an attachment, it copies the attachment to > /tmp/sup-attachment-ID and then calls run-mailcap. But sup knows what > name the file was attached as. Could sup save the attachment to > /tmp/filename? Or at least append the extension? In 0.4 you should see the extension being preserved. Let me know if that's not the case. So you should be able to simply call "open" on that file, rather than having to use your Perl script. > Although my preference would be to use the fullname which is > presumably what the file is named on the originating machine. This might be doable. I've been using the tempfile Ruby library to handle these files, which does two things: it obfuscates the name to avoid collisions, and it ensures the file is deleted once all references to the variable are garbage-collected. It might not be hard to replace this with something that only does the latter behavior. I might be able to programmatically delete the files too, instead of waiting for garbage collection. > By the way, sup works so well that I've now imported my old school > emails which I'd previously given up on. I now have blazing fast > search over my last ten years of email! Excellent! -- William From wmorgan-sup@masanjin.net Thu Jan 24 18:46:14 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 15:46:14 -0800 Subject: [sup-talk] indexed, but not In-Reply-To: <1201164353-sup-1929@buckwheat> References: <1201164353-sup-1929@buckwheat> Message-ID: <1201218203-sup-3803@south> Reformatted excerpts from Daniel Wagner's message of 2008-01-24: > I've managed to get myself into a bit of a strange situation, it > seems. I've received a mail into a Maildir, and I can see the mail > with, eg, vim. But, it doesn't appear in sup. > > Now, the odd thing is that it seems to be indexed. If I use '\' to > search for "death", I get one thread returned, but none of the > messages in that thread contain the word "death"! Not entirely sure I understand the situation. Is is new mail that doesn't appear in Sup, or any mail at all? By "appear in Sup" do you mean appear in the inbox, or appear at all? When you search for "death", view the thread, expand all messages (hit E), and search in that buffer (with /) for death, do you really not get anything? A general \ search like that can hit things like email addresses too. -- William From johnbent@lanl.gov Thu Jan 24 18:52:36 2008 From: johnbent@lanl.gov (John Bent) Date: Thu, 24 Jan 2008 16:52:36 -0700 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201216741-sup-4105@south> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> Message-ID: <1201218489-sup-3542@tangerine.lanl.gov> Excerpts from William Morgan's message of Thu Jan 24 16:26:20 -0700 2008: > Reformatted excerpts from John Bent's message of 2008-01-24: > > When sup opens an attachment, it copies the attachment to > > /tmp/sup-attachment-ID and then calls run-mailcap. But sup knows what > > name the file was attached as. Could sup save the attachment to > > /tmp/filename? Or at least append the extension? > > In 0.4 you should see the extension being preserved. Let me know if > that's not the case. > > So you should be able to simply call "open" on that file, rather than > having to use your Perl script. > Yep, just like you say. Although, I think I do still need to have something in /usr/bin/run-mailcap that parses "--action=view application/vnd.ms-powerpoint:/tmp/foo.ppt," and then execs "open /tmp/foo.ppt." But that's much better than having to guess an extension from the mime-type. John From wmorgan-sup@masanjin.net Thu Jan 24 19:26:50 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 16:26:50 -0800 Subject: [sup-talk] NoMethodError running sup-config In-Reply-To: References: Message-ID: <1201220266-sup-191@south> Reformatted excerpts from Sho Fukamachi's message of 2008-01-24: > I realise it's probably something dumb I'm doing but I did try a > couple of times. Any clues? Nope, this is an Official Bug. Sorry! The following minor patch should fix it. Git master and next have been updated with this. diff --git a/lib/sup/mbox/ssh-file.rb b/lib/sup/mbox/ssh-file.rb index 25074be..d474636 100644 --- a/lib/sup/mbox/ssh-file.rb +++ b/lib/sup/mbox/ssh-file.rb @@ -122,6 +122,7 @@ class SSHFile def seek loc; @offset = loc; end def tell; @offset; end def total; size; end + def path; @fn end def size if @file_size.nil? || (Time.now - @last_size_check) > SIZE_CHECK_INTERVAL -- William From wmorgan-sup@masanjin.net Thu Jan 24 19:17:17 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 16:17:17 -0800 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201218489-sup-3542@tangerine.lanl.gov> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> <1201218489-sup-3542@tangerine.lanl.gov> Message-ID: <1201220092-sup-8263@south> Reformatted excerpts from John Bent's message of 2008-01-24: > Yep, just like you say. Although, I think I do still need to have > something in /usr/bin/run-mailcap that parses "--action=view > application/vnd.ms-powerpoint:/tmp/foo.ppt," and then execs "open > /tmp/foo.ppt." But that's much better than having to guess an > extension from the mime-type. You don't even need to fake run-mailcap. You should just be able to have a one-line ~/.sup/hooks/mime-view.rb that looks like: system "open #{filename}" If open is a standard OS X command, then I will add some code to auto-detect it at some point. -- William From grant@antiflux.org Thu Jan 24 19:57:50 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Thu, 24 Jan 2008 19:57:50 -0500 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201220092-sup-8263@south> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> <1201218489-sup-3542@tangerine.lanl.gov> <1201220092-sup-8263@south> Message-ID: <1201222453-sup-1190@spooky.local> * William Morgan [Thu Jan 24 19:17:17 -0500 2008]: > If open is a standard OS X command, then I will add some code to > auto-detect it at some point. It is. Unfortunately, you can tell it which application to use, but not which MIME type. From wmorgan-sup@masanjin.net Thu Jan 24 21:54:02 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 18:54:02 -0800 Subject: [sup-talk] archived threads not returning to inbox In-Reply-To: <1201129847-sup-6955@tangerine.lanl.gov> References: <1201129847-sup-6955@tangerine.lanl.gov> Message-ID: <1201229597-sup-9416@south> Reformatted excerpts from John Bent's message of 2008-01-23: > I'm running sup-0.4 since this morning and I've noticed that archived > threads that get new messages are not reappearing in my inbox. I do > see the expected message: Loaded 1 new message, 1 to inbox. but the > thread doesn't reappear. If I quit and restart sup, then the thread > does correctly reappear in the inbox. I think I've fixed this in next, with commit 81794a14968410f70ee0563afcf3b1e7e90be101. Care to try? -- William From wmorgan-sup@masanjin.net Thu Jan 24 22:28:07 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 19:28:07 -0800 Subject: [sup-talk] header cache In-Reply-To: <1201079068-sup-438@ausone.inria.fr> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> <1200519319-sup-915@clarabella.clarabella> <1200557516-sup-8444@ausone.local> <1200570003-sup-1529@clarabella.clarabella> <1200581670-sup-9273@ausone.local> <1200969359-sup-2816@south> <1200990925-sup-1529@ausone.local> <1201071069-sup-6394@south> <1201079068-sup-438@ausone.inria.fr> Message-ID: <1201230428-sup-8760@south> [Sending to list. We accidentally fell off.] Reformatted excerpts from nicolas.pouillard's message of 2008-01-23: > Excerpts from William Morgan's message of Wed Jan 23 08:04:27 +0100 2008: > > Reformatted excerpts from nicolas.pouillard's message of 2008-01-22: > > > Looking at the code 'scan_mailbox' seems to be called quite > > > often (but not more than every 30 seconds). > > > > Oops, you're exactly right. > > > > > I'm wondering if peeking a file in a very large directory > > > is as fast as seeking to a particular offset in a large file? > > > > Actually, we could short-circuit this check trivially by comparing > > the directories' mtimes. Then this really shouldn't be a slowdown. > > You will still scan it at when receiving new mails... That's true. But some kind of scan is unavoidable. We need to know which files are new, and one way or another that will involve pulling in the whole list of files. I think we can do a couple easy things to speed up Maildir dramatically. Skip the scan when the mtime is unchanged, maybe increase the delay, stop repeating make_id calls for messages we've already processed... basically the current implementation is a little naive and I'm not ready to give up on Maildir quite yet. > What about having a custom mail box format for sup? > > For instance I think the only drawback (in the context of using sup) > of mbox is when you often backup you mails. Why not having a bunch of > mbox using dates inbox-12-2008.mbox? Or a directory where file names > are sup message ids? What about mbox makes it difficult to do backups? The amount of work for a custom format seems really high. (Look at all the design considerations that went into Maildir!) And ultimately your MTA has to be able to write that format, or there has to be a conversion script, which has to be run every 30 seconds, and has to be fast, and then we have the same set of problems we have now but in a different place. -- William From wmorgan-sup@masanjin.net Thu Jan 24 23:03:58 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 20:03:58 -0800 Subject: [sup-talk] return-path In-Reply-To: <20080123224712.GB32356@manheim.library.drexel.edu> References: <20080123211318.GB31529@manheim.library.drexel.edu> <1201125726-sup-1297@south> <20080123224712.GB32356@manheim.library.drexel.edu> Message-ID: <1201233750-sup-2616@south> Reformatted excerpts from Gabriel Sean Farrell's message of 2008-01-23: > I've added the line and applied the patch. Now I see "Return-Path" in > the headers of my message before I send it, but when I receive it the > return-path is still the one I was trying to override. Could the one > I set still be getting stripped out? I don't think so... you can apply the patch below and see exactly what Sup is sending sendmail. In my case, that header is intact. So it must be getting overwritten somewhere else in the system. There's some crazy interaction between this header, the From: and Sender: headers, and the -f option of sendmail. Maybe you should use a -f with sendmail (in your ~/.sup/config.yaml file)? Did you have a particular way of calling sendmail with Mutt? diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mod index 6a7f273..0e50724 100644 --- a/lib/sup/modes/edit-message-mode.rb +++ b/lib/sup/modes/edit-message-mode.rb @@ -279,6 +279,7 @@ protected date = Time.now m = build_message date IO.popen(acct.sendmail, "w") { |p| p.puts m } + File.open("sent-copy.txt", "w") { |f| f.puts m } raise SendmailCommandFailed, "Couldn't execute #{acct.sendmail}" unless $ SentManager.write_sent_message(date, from_email) { |f| f.puts sanitize_bo BufferManager.kill_buffer buffer -- William From wmorgan-sup@masanjin.net Thu Jan 24 23:10:50 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 20:10:50 -0800 Subject: [sup-talk] gem dependency for sup 0.4 In-Reply-To: <1201118863-sup-4011@wrasse> References: <1201118863-sup-4011@wrasse> Message-ID: <1201234180-sup-4502@south> Reformatted excerpts from Richard Heycock's message of 2008-01-23: > I upgraded to version 0.4 this morning using the gem and it didn't > pull in the gettext gem. I guess the gem doesn't include gettext as a > dependency. Weird. It's listed as a dependency in the Hoe spec, and the little test that I just tried right now pulled it in. Have other 0.4 installers had to install gettext manually? > On a slightly different note is there a bug tracker for sup? This mailing list, as it's represented in my Sup inbox. :) I also have a copy of doc/TODO that I maintain on a local branch, which I keep meaning to clean up and publicize. -- William From johnbent@lanl.gov Thu Jan 24 23:28:38 2008 From: johnbent@lanl.gov (John Bent) Date: Thu, 24 Jan 2008 21:28:38 -0700 Subject: [sup-talk] gem dependency for sup 0.4 In-Reply-To: <1201234180-sup-4502@south> References: <1201118863-sup-4011@wrasse> <1201234180-sup-4502@south> Message-ID: <1201235244-sup-5871@tangerine.lanl.gov> Excerpts from William Morgan's message of Thu Jan 24 21:10:50 -0700 2008: > Reformatted excerpts from Richard Heycock's message of 2008-01-23: > > I upgraded to version 0.4 this morning using the gem and it didn't > > pull in the gettext gem. I guess the gem doesn't include gettext as a > > dependency. > > Weird. It's listed as a dependency in the Hoe spec, and the little test > that I just tried right now pulled it in. Have other 0.4 installers > had to install gettext manually? > I had that problem too. I think I just did gem install gettext and then did the gem install sup-0.4 again. From johnbent@lanl.gov Thu Jan 24 23:40:08 2008 From: johnbent@lanl.gov (John Bent) Date: Thu, 24 Jan 2008 21:40:08 -0700 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201222453-sup-1190@spooky.local> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> <1201218489-sup-3542@tangerine.lanl.gov> <1201220092-sup-8263@south> <1201222453-sup-1190@spooky.local> Message-ID: <1201235901-sup-7426@tangerine.lanl.gov> Excerpts from Grant Hollingworth's message of Thu Jan 24 17:57:50 -0700 2008: > * William Morgan [Thu Jan 24 19:17:17 -0500 2008]: > > If open is a standard OS X command, then I will add some code to > > auto-detect it at some point. > > It is. Unfortunately, you can tell it which application to use, but > not which MIME type. True, but if it has the correct extension (which it does in 0.4), you don't need to tell it anything. That's great that I don't need to fake run-mailcap since there's a hook. From wmorgan-sup@masanjin.net Fri Jan 25 00:04:30 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 21:04:30 -0800 Subject: [sup-talk] sup crash on tab completion In-Reply-To: <20080123192521.GA30955@manheim.library.drexel.edu> References: <1200987490-sup-7392@south> <1200994656-sup-4998@tomsk> <1201072070-sup-2323@south> <20080123192521.GA30955@manheim.library.drexel.edu> Message-ID: <1201237209-sup-6966@south> Reformatted excerpts from Gabriel Sean Farrell's message of 2008-01-23: > Using Ferret's LetterAnalyzer on the "from" and "to" fields should do > this for you (i.e., create the appropriate tokens). I've stuck it in > the code, but I haven't been able to make it work. Something to do > with the twice-over query parsing, I think. I don't think we even need to be so sophisticated. Check out commits d09d4afbeb035c497f3682559ecb30ab42c009c6 and 360e105c0d08a5765b23c37b2026bff586b3d136 which I just merged into next. You should be able to search the from: field with email address LHSes and first and last names. Of course you will need to run sup-sync --all to reindex the sources you're interested in, if you want to apply this retroactively. -- William From wmorgan-sup@masanjin.net Fri Jan 25 00:08:30 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 21:08:30 -0800 Subject: [sup-talk] new in next: thread joining and better quotes In-Reply-To: <1200533604-sup-2015@south> References: <1200533604-sup-2015@south> Message-ID: <1201237691-sup-3721@south> Reformatted excerpts from William Morgan's message of 2008-01-16: > Also, you can now select multiple threads and press '#' to join them > into one thread. Once you write this back to index, there's no good > way to split them apart besides sup-syncing, so be careful. Hm, this doesn't seem to always work... -- William From wmorgan-sup@masanjin.net Fri Jan 25 00:14:01 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 21:14:01 -0800 Subject: [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits. In-Reply-To: <1201081580-sup-6798@tomsk> References: <1200646334-sup-3256@archie> <1200970931-sup-8284@south> <1201034511-sup-3452@tomsk> <1201065536-sup-7142@south> <1201081580-sup-6798@tomsk> Message-ID: <1201237734-sup-3305@south> Reformatted excerpts from Marcus Williams's message of 2008-01-23: > If you store the id in the ferret index, is it quick enough just to > use ferret to tell you if its there? That way an id could be a string > and could be tracked by the source via ferret (a source would just > have to guarantee its unique when combined with the source id). I don't think so. I haven't tested this empirically, and Ferret is pretty darn fast, but it comes down to this: if we have to perform an operation a number of times that scales linearly with the number of messages in a mailstore (which unfortunately we do), that operation shouldn't be something like "do a search on a search engine". In fact, if the make_id call /is/ actually slower than a Ferret search, and that's the bottleneck, we can rewrite that with RubyInline or something and there's no way Ferret will be faster than that. > Off on a slight tangent - I cant get any maildir working with sup > here. I added a maildir to my sources list and it gets scanned as > expected but nothing gets into the index. I'm wondering whether this > is as a result of the id function. Is this with Jeff's fix for the id? -- William From johnbent@lanl.gov Fri Jan 25 00:13:22 2008 From: johnbent@lanl.gov (John Bent) Date: Thu, 24 Jan 2008 22:13:22 -0700 Subject: [sup-talk] archived threads not returning to inbox In-Reply-To: <1201229597-sup-9416@south> References: <1201129847-sup-6955@tangerine.lanl.gov> <1201229597-sup-9416@south> Message-ID: <1201237649-sup-2371@tangerine.lanl.gov> Excerpts from William Morgan's message of Thu Jan 24 19:54:02 -0700 2008: > Reformatted excerpts from John Bent's message of 2008-01-23: > > I'm running sup-0.4 since this morning and I've noticed that archived > > threads that get new messages are not reappearing in my inbox. I do > > see the expected message: Loaded 1 new message, 1 to inbox. but the > > thread doesn't reappear. If I quit and restart sup, then the thread > > does correctly reappear in the inbox. > > I think I've fixed this in next, with commit > 81794a14968410f70ee0563afcf3b1e7e90be101. > > Care to try? > It works. Thanks! From johnbent@lanl.gov Fri Jan 25 00:18:02 2008 From: johnbent@lanl.gov (John Bent) Date: Thu, 24 Jan 2008 22:18:02 -0700 Subject: [sup-talk] new in next: thread joining and better quotes In-Reply-To: <1201237691-sup-3721@south> References: <1200533604-sup-2015@south> <1201237691-sup-3721@south> Message-ID: <1201238225-sup-5297@tangerine.lanl.gov> Excerpts from William Morgan's message of Thu Jan 24 22:08:30 -0700 2008: > Reformatted excerpts from William Morgan's message of 2008-01-16: > > Also, you can now select multiple threads and press '#' to join them > > into one thread. Once you write this back to index, there's no good > > way to split them apart besides sup-syncing, so be careful. > > Hm, this doesn't seem to always work... > I just tried and it worked. This is a really nice feature. I didn't notice it before in the help menu and I've been wanting this feature. From wmorgan-sup@masanjin.net Fri Jan 25 00:20:26 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 21:20:26 -0800 Subject: [sup-talk] indexed, but not In-Reply-To: <1201218203-sup-3803@south> References: <1201164353-sup-1929@buckwheat> <1201218203-sup-3803@south> Message-ID: <1201238392-sup-9049@south> Also, make sure you're running Sup 0.4. Your User-Agent header is claiming 0.3. -- William From wmorgan-sup@masanjin.net Fri Jan 25 00:27:14 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 21:27:14 -0800 Subject: [sup-talk] [PATCH] return sources in id-order, with non-archived sources first In-Reply-To: <1200675726-sup-4860@spooky.local> References: <1200675726-sup-4860@spooky.local> Message-ID: <1201238649-sup-7598@south> Reformatted excerpts from Grant Hollingworth's message of 2008-01-18: > To speed up the user's view of polling, deal with sources that affect > the inbox before (for example) large mailing lists. It seemed tidier > to implement this in Index rather than PollManager. Very nice. One minor comment below. > I changed "@sources.values" to "sources" in some other methods for > clarity, which I think in this case outweighs lost efficiency. Sounds good. And efficiency is the least of our concerns! > + def sources > + ## favour the inbox by listing non-archived sources first > + @sources.values.sort_by {|s| s.id }.partition {|s| !s.archived? }.flatten > + end Why bother sorting by id at all? Why not just something like: @sources.values.sort_by { |s| s.archived? ? 0 : 1 } -- William From wmorgan-sup@masanjin.net Fri Jan 25 00:35:53 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 21:35:53 -0800 Subject: [sup-talk] [PATCH] Allow user to show all matching threads In-Reply-To: <1200770173-sup-671@tomsk> References: <1200770173-sup-671@tomsk> Message-ID: <1201239283-sup-9420@south> Reformatted excerpts from Marcus Williams's message of 2008-01-19: > This adds a double keypress action "!!" to load all threads in the > current search/view. Obviously this can return a lot of threads, but > coupled with the cancel search option it is now easy to stop. Merged into next! -- William From rgh@roughage.com.au Fri Jan 25 00:46:11 2008 From: rgh@roughage.com.au (Richard Heycock) Date: Fri, 25 Jan 2008 16:46:11 +1100 Subject: [sup-talk] gem dependency for sup 0.4 In-Reply-To: <1201235244-sup-5871@tangerine.lanl.gov> References: <1201118863-sup-4011@wrasse> <1201234180-sup-4502@south> <1201235244-sup-5871@tangerine.lanl.gov> Message-ID: <1201239926-sup-3569@wrasse> Excerpts from John Bent's message of Fri Jan 25 15:28:38 +1100 2008: > Excerpts from William Morgan's message of Thu Jan 24 21:10:50 -0700 2008: > > Reformatted excerpts from Richard Heycock's message of 2008-01-23: > > > I upgraded to version 0.4 this morning using the gem and it didn't > > > pull in the gettext gem. I guess the gem doesn't include gettext as a > > > dependency. > > > > Weird. It's listed as a dependency in the Hoe spec, and the little test > > that I just tried right now pulled it in. Have other 0.4 installers > > had to install gettext manually? > > > I had that problem too. I think I just did gem install gettext and then > did the gem install sup-0.4 again. Likewise. I installed gettext and everything was fine after that. rgh -- 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 Fri Jan 25 00:59:43 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Thu, 24 Jan 2008 21:59:43 -0800 Subject: [sup-talk] 0.5 thoughts Message-ID: <1201240480-sup-1977@south> Here are a couple things I'm interested in working on for an 0.5 release: - Maildir speedups - IMAP connection sharing - Mbox filehandle closing (currently every mbox gets its own filehandle which is kept open for the duration of the program) - Date conversion to the local timezone, for sorting and display - Configurable colors. Everyone's favorite. - Notes. Like draft emails without a recipient, but treated specially by the UI. Never sent; just for local use. - gpg-hook for auto-selecting sign/encrypt/both based on whatever you want. Any critical issues for people that they'd like to see addressed? -- William From johnbent@lanl.gov Fri Jan 25 01:22:54 2008 From: johnbent@lanl.gov (John Bent) Date: Thu, 24 Jan 2008 23:22:54 -0700 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201240480-sup-1977@south> References: <1201240480-sup-1977@south> Message-ID: <1201241373-sup-5327@tangerine.lanl.gov> Excerpts from William Morgan's message of Thu Jan 24 22:59:43 -0700 2008: > Here are a couple things I'm interested in working on for an 0.5 > release: > > - Mbox filehandle closing (currently every mbox gets its own filehandle > which is kept open for the duration of the program) Is this a good thing? I'd rather set my open filehandle limit really high and have them kept open. Isn't it slower to constantly have to reopen them? Well, I guess the unusual ones certainly don't need an open handle. > - Date conversion to the local timezone, for sorting and display Yeah, there's something wrong with my timestamps. Everything shows up as PM. The time is right but it always says PM in the display... > - Notes. Like draft emails without a recipient, but treated specially > by the UI. Never sent; just for local use. > - gpg-hook for auto-selecting sign/encrypt/both based on whatever you > want. > These would be nice. > Any critical issues for people that they'd like to see addressed? > I don't know what your philosophical feelings are about this but it might be nice to combine IM into sup. It'd be a bunch more protocols to incorporate and the model might be completely different though. Also, is there a way to go from one thread-view directly to another? I always have to 'x' to go back to the search-results-mode or the inbox-mode and then scroll to the message I want. I thought 'n' and 'p' would do this but I've never been able to get them to do anything for me. Maybe I'm just not understanding something? In case it's not clear, I want the functionality of the 'Newer' and 'Older' links in gmail. Thanks again for all your hard work. I'm very happy about sup; it's made me much more productive and much better organized. I really appreciate the efforts of you and all the other contributors. From gsf@fruct.us Fri Jan 25 02:50:12 2008 From: gsf@fruct.us (Gabriel Sean Farrell) Date: Fri, 25 Jan 2008 02:50:12 -0500 Subject: [sup-talk] return-path In-Reply-To: <1201233750-sup-2616@south> References: <20080123211318.GB31529@manheim.library.drexel.edu> <1201125726-sup-1297@south> <20080123224712.GB32356@manheim.library.drexel.edu> <1201233750-sup-2616@south> Message-ID: <1201246425-sup-9409@magnum> Excerpts from William Morgan's message of Thu Jan 24 23:03:58 -0500 2008: > I don't think so... you can apply the patch below and see exactly what > Sup is sending sendmail. In my case, that header is intact. So it must > be getting overwritten somewhere else in the system. > > There's some crazy interaction between this header, the From: and > Sender: headers, and the -f option of sendmail. Maybe you should use a > -f with sendmail (in your ~/.sup/config.yaml file)? Did you have a > particular way of calling sendmail with Mutt? Right you are about the crazy interaction. It's not clear to me how Mutt is calling sendmail, but now I'm guessing all that the "set envelope_from=yes" does in mutt is add the -f flag followed by one's "from" email to the call to sendmail. If I do that in my ~/.sup/config.yaml, the return-path is set correctly (at least, it was in my tests. How does this message look?!). In fact, I believe it's set correctly even if I don't set the return-path in ~/.sup/hooks/edit-before.rb or patch lib/mbox.rb. In other words, all that needs to be done to fix my problem is the addition of -f to the sendmail call. Maybe it could be an option in the initial account setup? Oh, and thanks for all the work you're doing on sup, William. Really great stuff. From nicolas.pouillard@gmail.com Fri Jan 25 03:50:20 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Fri, 25 Jan 2008 09:50:20 +0100 Subject: [sup-talk] header cache In-Reply-To: <1201230428-sup-8760@south> References: <704d6aa20801150454j635ed24p63fd544579c6e148@mail.gmail.com> <1200453820-sup-4777@south> <1200514969-sup-7541@clarabella.clarabella> <1200516410-sup-1963@south> <1200519319-sup-915@clarabella.clarabella> <1200557516-sup-8444@ausone.local> <1200570003-sup-1529@clarabella.clarabella> <1200581670-sup-9273@ausone.local> <1200969359-sup-2816@south> <1200990925-sup-1529@ausone.local> <1201071069-sup-6394@south> <1201079068-sup-438@ausone.inria.fr> <1201230428-sup-8760@south> Message-ID: <1201250434-sup-4567@ausone.local> Excerpts from William Morgan's message of Fri Jan 25 04:28:07 +0100 2008: > [Sending to list. We accidentally fell off.] > > Reformatted excerpts from nicolas.pouillard's message of 2008-01-23: > > Excerpts from William Morgan's message of Wed Jan 23 08:04:27 +0100 2008: > > > Reformatted excerpts from nicolas.pouillard's message of 2008-01-22: > > > > Looking at the code 'scan_mailbox' seems to be called quite > > > > often (but not more than every 30 seconds). > > > > > > Oops, you're exactly right. > > > > > > > I'm wondering if peeking a file in a very large directory > > > > is as fast as seeking to a particular offset in a large file? > > > > > > Actually, we could short-circuit this check trivially by comparing > > > the directories' mtimes. Then this really shouldn't be a slowdown. > > > > You will still scan it at when receiving new mails... > > That's true. But some kind of scan is unavoidable. We need to know which > files are new, and one way or another that will involve pulling in the > whole list of files. > > I think we can do a couple easy things to speed up Maildir dramatically. > Skip the scan when the mtime is unchanged, maybe increase the delay, > stop repeating make_id calls for messages we've already processed... > basically the current implementation is a little naive and I'm not ready > to give up on Maildir quite yet. What about having two directories? new and cur for instance :) You always have to scan new and move them to cur when they are in the index. > > What about having a custom mail box format for sup? > > > > For instance I think the only drawback (in the context of using sup) > > of mbox is when you often backup you mails. Why not having a bunch of > > mbox using dates inbox-12-2008.mbox? Or a directory where file names > > are sup message ids? > > What about mbox makes it difficult to do backups? Every hour, if my backup drive is plugged in, my OS make a new tree of my entire disk by hard linking what's haven't change and by coping others. However this behave particularly bad with files that just keep growing every hour ~400MB at this day. That's why splitting out my big mail box in small ones, let's say every month, would better behave w.r.t. to backups. > The amount of work for a custom format seems really high. (Look at all > the design considerations that went into Maildir!) And ultimately your > MTA has to be able to write that format, or there has to be a conversion > script, which has to be run every 30 seconds, and has to be fast, and > then we have the same set of problems we have now but in a different > place. Your MTA call a MDA like maildrop, and making a specific maildrop in ruby is pretty easy. Best regards, -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 186 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080125/cd24b771/attachment.bin From sho.fukamachi@gmail.com Fri Jan 25 05:35:30 2008 From: sho.fukamachi@gmail.com (Sho Fukamachi) Date: Fri, 25 Jan 2008 21:35:30 +1100 Subject: [sup-talk] NoMethodError running sup-config In-Reply-To: <1201220266-sup-191@south> References: <1201220266-sup-191@south> Message-ID: On 25/01/2008, at 11:26 AM, William Morgan wrote: > Nope, this is an Official Bug. Sorry! The following minor patch should > fix it. Git master and next have been updated with this. Great, I cloned it and ran from there. The problem is fixed, but exposed another problem when it tried to do a sup-add, which also errored out. I was able, however, to do the sup-add manually without further issue. Weirdly, my friend also running leopard didn't have any issue at all. Maybe a gem I have installed? She was running stock, I have a billion gems installed for dev work. Anyway, thanks for your help! I really like sup .. it's a joy to use. One more thing: there seem to be pretty severe display errors when I display (and scroll through) japanese mail. I'm not really sure how to go about troubleshooting what's wrong. Shall I make a new thread here, or send you the mail I have in mind which exposes the problem directly? thanks! Sho -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2429 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080125/9ce505ed/attachment.bin From sho.fukamachi@gmail.com Fri Jan 25 06:12:18 2008 From: sho.fukamachi@gmail.com (Sho Fukamachi) Date: Fri, 25 Jan 2008 22:12:18 +1100 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201240480-sup-1977@south> References: <1201240480-sup-1977@south> Message-ID: <288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com> On 25/01/2008, at 4:59 PM, William Morgan wrote: > Any critical issues for people that they'd like to see addressed? Hm, wouldn't call them critical but here are some of my thoughts: - detect locale of system, or offer a choice, for VIM spellcheck. It's currently hardcoded to en_us - detect from system somehow? - detect when kill has failed if launched with an extant .sup/lock - offer to delete the lockfile? If sup crashes, it's currently impossible to reload without manually deleting the file. Maybe offer to do it after a couple of tries - better unicode (in and out) support - search in buffer doesn't work at all, and scrolling through a mail with a lot of unicode causes severe graphical artifacts - at least a cursory effort to not store login credentials in plaintext .. how to store them whilst retaining simplicity and platform independence is an interesting question. Not sure how far sup (or anyone really) wants to go down that particular rabbit hole - attachments/downloads folder? again, I wonder how this fits in with sup's philosophy - ability to send using something other than local sendmail? for remote mbox, we have a ssh session open and everything .. and dynamic IPs are often RBL'ed - DB store? in particular, sqlite? especially for user config ...? with a view to multiuser access sans user directories & setup files.....? - Launch cargo to high orbit for less than $100/ton and cook a 5-star gourmet bouillabaisse from garden scraps? ok ok ok i'll stop now ..! thanks : ) Sho -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2429 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080125/9abe7b64/attachment.bin From nicolas.pouillard@gmail.com Fri Jan 25 06:26:08 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Fri, 25 Jan 2008 12:26:08 +0100 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com> References: <1201240480-sup-1977@south> <288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com> Message-ID: <1201260309-sup-8211@ausone.local> Excerpts from Sho Fukamachi's message of Fri Jan 25 12:12:18 +0100 2008: > > On 25/01/2008, at 4:59 PM, William Morgan wrote: > > > Any critical issues for people that they'd like to see addressed? > > Hm, wouldn't call them critical but here are some of my thoughts: > > - detect locale of system, or offer a choice, for VIM spellcheck. It's > currently hardcoded to en_us - detect from system somehow? +1 > - detect when kill has failed if launched with an extant .sup/lock - > offer to delete the lockfile? If sup crashes, it's currently > impossible to reload without manually deleting the file. Maybe offer > to do it after a couple of tries +1 > - better unicode (in and out) support - search in buffer doesn't work > at all, and scrolling through a mail with a lot of unicode causes > severe graphical artifacts +1 Best regards, -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 186 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080125/35ed436f/attachment.bin From marko.myllymaki@iki.fi Fri Jan 25 07:09:53 2008 From: marko.myllymaki@iki.fi (Marko Myllymäki) Date: Fri, 25 Jan 2008 14:09:53 +0200 Subject: [sup-talk] char. encoding problems - garbled output In-Reply-To: <1200763427-sup-2564@south> References: <478F4F67.1040405@iki.fi> <1200763427-sup-2564@south> Message-ID: <1201262947-sup-9132@sieni> Excerpts from William Morgan's message of Sat Jan 19 19:25:00 +0200 2008: > Does the following patch help? Sorry, I'm really Sup-newbie and I don't know how to apply these patches yet :) ... figuring it out later. I think the problems are mainly caused by the wide characters (whatever that means, I guess multibyte codes). I'm using Sup as my main email-client now, 0.4 works quite nicely. When I have time I try to dig into these character things and read more your devel notes. From vasudeva@linkswarm.com Fri Jan 25 08:22:52 2008 From: vasudeva@linkswarm.com (vasudeva) Date: Fri, 25 Jan 2008 08:22:52 -0500 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201240480-sup-1977@south> References: <1201240480-sup-1977@south> Message-ID: <1201267105-sup-1149@lenin> Excerpts from William Morgan's message of Fri Jan 25 00:59:43 -0500 2008: > Here are a couple things I'm interested in working on for an 0.5 > release: > > - Notes. Like draft emails without a recipient, but treated specially > by the UI. Never sent; just for local use. If we're interested in 'Getting Things Done', then a nice related feature might be the ability to tell sup not to exit on a 'q' keypress if there are buffers open marked TODO (or whatever). One of the things I like about sup is the multi-window approach, because instead of making me feel *bad* about having lots of half-finished work, it makes me feel as though it's reasonable I might just have it going in the background. I find this mis-truth appealing. Problem is, one 'q' hit (very easily done, ex-mutt user, etc) and I've lost my TODO state. -- linkswarm.com :: Collaborative Insolence vasudeva.linkswarm.com/gallery :: For The Faint of Heart From johnbent@lanl.gov Fri Jan 25 09:46:12 2008 From: johnbent@lanl.gov (John Bent) Date: Fri, 25 Jan 2008 07:46:12 -0700 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201240480-sup-1977@south> References: <1201240480-sup-1977@south> Message-ID: <1201272308-sup-8434@tangerine.lanl.gov> Excerpts from William Morgan's message of Thu Jan 24 22:59:43 -0700 2008: > Here are a couple things I'm interested in working on for an 0.5 > release: > > Any critical issues for people that they'd like to see addressed? > Not critical but in reading about ferret, I saw that it can search and index various mime-types such as pdf. Allowing search into attachments would be very cool. From grant@antiflux.org Fri Jan 25 10:04:22 2008 From: grant@antiflux.org (Grant Hollingworth) Date: Fri, 25 Jan 2008 10:04:22 -0500 Subject: [sup-talk] [PATCH] return sources in id-order, with non-archived sources first In-Reply-To: <1201238649-sup-7598@south> References: <1200675726-sup-4860@spooky.local> <1201238649-sup-7598@south> Message-ID: <1201272768-sup-3795@spooky.local> * William Morgan [Fri Jan 25 00:27:14 -0500 2008]: > > + def sources > > + ## favour the inbox by listing non-archived sources first > > + @sources.values.sort_by {|s| s.id }.partition {|s| !s.archived? }.flatten > > + end > > Why bother sorting by id at all? Why not just something like: > @sources.values.sort_by { |s| s.archived? ? 0 : 1 } I probably did that because it's likely that an inbox is the first source. It's not really necessary. I think partition is clearer than sort_by in this case. How about changing @sources to an array? From wmorgan-sup@masanjin.net Fri Jan 25 11:33:30 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 25 Jan 2008 08:33:30 -0800 Subject: [sup-talk] gem dependency for sup 0.4 In-Reply-To: <1201239926-sup-3569@wrasse> References: <1201118863-sup-4011@wrasse> <1201234180-sup-4502@south> <1201235244-sup-5871@tangerine.lanl.gov> <1201239926-sup-3569@wrasse> Message-ID: <1201278788-sup-3409@south> Reformatted excerpts from Richard Heycock's message of 2008-01-24: > Likewise. I installed gettext and everything was fine after that. When you guys to a "gem dependency sup", do you see gettext listed? -- William From wmorgan-sup@masanjin.net Fri Jan 25 11:52:20 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 25 Jan 2008 08:52:20 -0800 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201241373-sup-5327@tangerine.lanl.gov> References: <1201240480-sup-1977@south> <1201241373-sup-5327@tangerine.lanl.gov> Message-ID: <1201279056-sup-4012@south> Reformatted excerpts from John Bent's message of 2008-01-24: > Excerpts from William Morgan's message of Thu Jan 24 22:59:43 -0700 2008: > > - Mbox filehandle closing (currently every mbox gets its own > > filehandle which is kept open for the duration of the program) > > Is this a good thing? I'd rather set my open filehandle limit really > high and have them kept open. Isn't it slower to constantly have to > reopen them? Well, I guess the unusual ones certainly don't need an > open handle. It will introduce a very minor slowdown, but I don't think it will really be that noticeable. And the current approach basically prevents people from having large numbers of mbox sources, which is a little contrary to the Sup philosophy of "put every email you've ever read in one program." > > - Date conversion to the local timezone, for sorting and display > Yeah, there's something wrong with my timestamps. Everything shows up > as PM. The time is right but it always says PM in the display... That's weird. Is this in thread-index-mode? What about when you expand the header ('h') in thread-view-mode? Does the time appear correctly? > I don't know what your philosophical feelings are about this but it > might be nice to combine IM into sup. It'd be a bunch more protocols > to incorporate and the model might be completely different though. Iiiinteresting. Making Sup an IM client proper is almost certainly a world of misery. Getting the current textfield stuff working was a goddamn nightmare, and it's still very wonky. It does seem a little weird, philosophically speaking, but I wouldn't throw such code away if it were dumped on my lap. :) That said, what WOULD be easy is to treat IM logs as a message source, and put conversations in the index, gmail style. > Also, is there a way to go from one thread-view directly to another? > I always have to 'x' to go back to the search-results-mode or the > inbox-mode and then scroll to the message I want. Try the comma-commands. ",n", etc. > I thought 'n' and 'p' would do this but I've never been able to get > them to do anything for me. These jump between individual open messages in a thread. > Thanks again for all your hard work. I'm very happy about sup; it's > made me much more productive and much better organized. I really > appreciate the efforts of you and all the other contributors. Glad to hear it. Sup is mostly to scratch my own itch. -- William From daniel@wagner-home.com Fri Jan 25 13:16:33 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Fri, 25 Jan 2008 10:16:33 -0800 Subject: [sup-talk] indexed, but not In-Reply-To: <1201238392-sup-9049@south> References: <1201164353-sup-1929@buckwheat> <1201218203-sup-3803@south> <1201238392-sup-9049@south> Message-ID: <1201284935-sup-5329@buckwheat> Excerpts from William Morgan's message of Thu Jan 24 21:20:26 -0800 2008: > Also, make sure you're running Sup 0.4. Your User-Agent header is > claiming 0.3. Okay, it appears in 0.4. Weird one, thanks for the help. ~d From johnbent@lanl.gov Fri Jan 25 13:57:44 2008 From: johnbent@lanl.gov (John Bent) Date: Fri, 25 Jan 2008 11:57:44 -0700 Subject: [sup-talk] gem dependency for sup 0.4 In-Reply-To: <1201278788-sup-3409@south> References: <1201118863-sup-4011@wrasse> <1201234180-sup-4502@south> <1201235244-sup-5871@tangerine.lanl.gov> <1201239926-sup-3569@wrasse> <1201278788-sup-3409@south> Message-ID: <1201287424-sup-9358@tangerine.lanl.gov> Excerpts from William Morgan's message of Fri Jan 25 09:33:30 -0700 2008: > Reformatted excerpts from Richard Heycock's message of 2008-01-24: > > Likewise. I installed gettext and everything was fine after that. > > When you guys to a "gem dependency sup", do you see gettext listed? > tangerine:~>gem dependency sup | egrep 'sup|gettext' Gem sup-0.3 Gem sup-0.4 gettext (>= 0) Gem sup-999 gettext (> 0.0.0) So, yes for 0.4 and 999, and no for 0.3. From wmorgan-sup@masanjin.net Fri Jan 25 14:17:09 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Fri, 25 Jan 2008 11:17:09 -0800 Subject: [sup-talk] gem dependency for sup 0.4 In-Reply-To: <1201287424-sup-9358@tangerine.lanl.gov> References: <1201118863-sup-4011@wrasse> <1201234180-sup-4502@south> <1201235244-sup-5871@tangerine.lanl.gov> <1201239926-sup-3569@wrasse> <1201278788-sup-3409@south> <1201287424-sup-9358@tangerine.lanl.gov> Message-ID: <1201288599-sup-6491@south> Reformatted excerpts from John Bent's message of 2008-01-25: > So, yes for 0.4 and 999, and no for 0.3. So it's in the gemspec, but not pulled in by gem install? Most illogical. -- William From nicolas.pouillard@gmail.com Fri Jan 25 15:37:20 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Fri, 25 Jan 2008 21:37:20 +0100 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201279056-sup-4012@south> References: <1201240480-sup-1977@south> <1201241373-sup-5327@tangerine.lanl.gov> <1201279056-sup-4012@south> Message-ID: <1201293322-sup-3362@ausone.local> Excerpts from William Morgan's message of Fri Jan 25 17:52:20 +0100 2008: > Reformatted excerpts from John Bent's message of 2008-01-24: > > Excerpts from William Morgan's message of Thu Jan 24 22:59:43 -0700 2008: > > > - Mbox filehandle closing (currently every mbox gets its own > > > filehandle which is kept open for the duration of the program) > > > > Is this a good thing? I'd rather set my open filehandle limit really > > high and have them kept open. Isn't it slower to constantly have to > > reopen them? Well, I guess the unusual ones certainly don't need an > > open handle. > > It will introduce a very minor slowdown, but I don't think it will > really be that noticeable. And the current approach basically prevents > people from having large numbers of mbox sources, which is a little > contrary to the Sup philosophy of "put every email you've ever read in > one program." I don't get link between having a lot of mails and a lot of mbox sources, for instance I have only one big mbox, and don't see the need for multiple sources (apart these backup considerations). -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 186 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080125/cd384fcb/attachment.bin From johnbent@lanl.gov Fri Jan 25 17:31:06 2008 From: johnbent@lanl.gov (John Bent) Date: Fri, 25 Jan 2008 15:31:06 -0700 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201279056-sup-4012@south> References: <1201240480-sup-1977@south> <1201241373-sup-5327@tangerine.lanl.gov> <1201279056-sup-4012@south> Message-ID: <1201300095-sup-4454@tangerine.lanl.gov> Excerpts from William Morgan's message of Fri Jan 25 09:52:20 -0700 2008: > Reformatted excerpts from John Bent's message of 2008-01-24: > > Excerpts from William Morgan's message of Thu Jan 24 22:59:43 -0700 2008: > > > > - Date conversion to the local timezone, for sorting and display > > Yeah, there's something wrong with my timestamps. Everything shows up > > as PM. The time is right but it always says PM in the display... > > That's weird. Is this in thread-index-mode? What about when you expand > the header ('h') in thread-view-mode? Does the time appear correctly? > Still incorrect with the expanded header. I checked the mbox file to see if fetchmail was maybe screwing it up but it looks right in there. > Iiiinteresting. Making Sup an IM client proper is almost certainly > a world of misery. Getting the current textfield stuff working was a > goddamn nightmare, and it's still very wonky. It does seem a little > weird, philosophically speaking, but I wouldn't throw such code away if > it were dumped on my lap. :) > > That said, what WOULD be easy is to treat IM logs as a message source, > and put conversations in the index, gmail style. > That'd probably actually be what I most want. I have a separate IM client and I treat IM conversations and email slightly differently. But ultimately they are still conversations and it be great to integrate them into sup so I could search through them too. > > Also, is there a way to go from one thread-view directly to another? > > I always have to 'x' to go back to the search-results-mode or the > > inbox-mode and then scroll to the message I want. > > Try the comma-commands. ",n", etc. > Ok, ",n" is great. Thanks. A ",p" would be nice too.... From johnbent@lanl.gov Fri Jan 25 19:35:17 2008 From: johnbent@lanl.gov (John Bent) Date: Fri, 25 Jan 2008 17:35:17 -0700 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201235901-sup-7426@tangerine.lanl.gov> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> <1201218489-sup-3542@tangerine.lanl.gov> <1201220092-sup-8263@south> <1201222453-sup-1190@spooky.local> <1201235901-sup-7426@tangerine.lanl.gov> Message-ID: <1201307667-sup-2659@tangerine.lanl.gov> Excerpts from John Bent's message of Thu Jan 24 21:40:08 -0700 2008: > Excerpts from Grant Hollingworth's message of Thu Jan 24 17:57:50 -0700 2008: > > * William Morgan [Thu Jan 24 19:17:17 -0500 2008]: > > > If open is a standard OS X command, then I will add some code to > > > auto-detect it at some point. > > > > It is. Unfortunately, you can tell it which application to use, but > > not which MIME type. > > True, but if it has the correct extension (which it does in 0.4), you > don't need to tell it anything. > > That's great that I don't need to fake run-mailcap since there's a hook. > The hook works (system "open \'#{filename}\'"), but sup thinks it is failing. I get a message saying view failed, displaying as text. Maybe it should be (! system "open \'#{filename}\'") ? Also, I added the \' because I noticed before that sometimes filename has spaces in it and then open won't work. John From johnbent@lanl.gov Fri Jan 25 19:37:07 2008 From: johnbent@lanl.gov (John Bent) Date: Fri, 25 Jan 2008 17:37:07 -0700 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201267105-sup-1149@lenin> References: <1201240480-sup-1977@south> <1201267105-sup-1149@lenin> Message-ID: <1201307782-sup-1056@tangerine.lanl.gov> Excerpts from vasudeva's message of Fri Jan 25 06:22:52 -0700 2008: > Excerpts from William Morgan's message of Fri Jan 25 00:59:43 -0500 2008: > If we're interested in 'Getting Things Done', then a nice related > feature might be the ability to tell sup not to exit on a 'q' keypress > if there are buffers open marked TODO (or whatever). One of the things I > like about sup is the multi-window approach, because instead of making > me feel *bad* about having lots of half-finished work, it makes me feel > as though it's reasonable I might just have it going in the background. > I find this mis-truth appealing. > What is this TODO buffer you're talking about please? Sounds useful! From vasudeva@linkswarm.com Fri Jan 25 20:00:13 2008 From: vasudeva@linkswarm.com (vasudeva) Date: Fri, 25 Jan 2008 20:00:13 -0500 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201307782-sup-1056@tangerine.lanl.gov> References: <1201240480-sup-1977@south> <1201267105-sup-1149@lenin> <1201307782-sup-1056@tangerine.lanl.gov> Message-ID: <1201308435-sup-8242@lenin> Excerpts from John Bent's message of Fri Jan 25 19:37:07 -0500 2008: > Excerpts from vasudeva's message of Fri Jan 25 06:22:52 -0700 2008: > > Excerpts from William Morgan's message of Fri Jan 25 00:59:43 -0500 2008: > > If we're interested in 'Getting Things Done', then a nice related > > feature might be the ability to tell sup not to exit on a 'q' keypress > > if there are buffers open marked TODO (or whatever). One of the things I > > like about sup is the multi-window approach, because instead of making > > me feel *bad* about having lots of half-finished work, it makes me feel > > as though it's reasonable I might just have it going in the background. > > I find this mis-truth appealing. > > > What is this TODO buffer you're talking about please? Sounds useful! Sort of random association I made. There's a neat type-A smartypants thing called 'Getting Things Done' which seems to be a methodology for... getting things done. More here... http://en.wikipedia.org/wiki/Getting_Things_Done The bit William brought up about adding 'note' objects piqued my interest and seemed kind of GTD-ish. Personally, I tend to use my inbox as my TODO list, so the ability to "stick" windows -- to set sup buffers non-volatile -- would be something I'd use a lot. As a long-time mutt user, a certain background portion of my brain, as I navigate sup, is devoted entirely to NOT hitting the 'q' key, which is basically muscle memory at this point. -- linkswarm.com :: Collaborative Insolence vasudeva.linkswarm.com/gallery :: For The Faint of Heart From daniel@wagner-home.com Sat Jan 26 00:03:33 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Fri, 25 Jan 2008 21:03:33 -0800 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com> References: <1201240480-sup-1977@south> <288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com> Message-ID: <1201323295-sup-3282@buckwheat> Excerpts from Sho Fukamachi's message of Fri Jan 25 03:12:18 -0800 2008: > - detect locale of system, or offer a choice, for VIM spellcheck. It's > currently hardcoded to en_us - detect from system somehow? That doesn't sound right to me. Have you had a look in your config.yaml? More info on the Wiki page: http://sup.rubyforge.org/wiki/wiki.pl?VimIntegration I actually *like* that Sup doesn't assume too much about my editor. > - at least a cursory effort to not store login credentials in > plaintext .. how to store them whilst retaining simplicity and > platform independence is an interesting question. Not sure how far sup > (or anyone really) wants to go down that particular rabbit hole I don't like this idea. I think it was Gaim (now Pidgin) that first opened my eyes to the possibility that plaintext passwords might not be so bad. The Pidgin page seems to be down just now, so I can't say for certain that this is the essay I originally read, but http://developer.pidgin.im/wiki/PlainTextPasswords?format=txt sounds like a promising result from Google. > - ability to send using something other than local sendmail? for > remote mbox, we have a ssh session open and everything .. and dynamic > IPs are often RBL'ed My config.yaml has an option for this, have a look there. Have fun! ~d From daniel@wagner-home.com Sat Jan 26 00:05:17 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Fri, 25 Jan 2008 21:05:17 -0800 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201240480-sup-1977@south> References: <1201240480-sup-1977@south> Message-ID: <1201323831-sup-9018@buckwheat> This is sort of a big-ish feature, but are there any plans for LDAP support? (I'm expecting "patches welcome" to go here. =) ~d From daniel@wagner-home.com Sat Jan 26 00:12:28 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Fri, 25 Jan 2008 21:12:28 -0800 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201323295-sup-3282@buckwheat> References: <1201240480-sup-1977@south> <288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com> <1201323295-sup-3282@buckwheat> Message-ID: <1201324251-sup-2682@buckwheat> Excerpts from Daniel Wagner's message of Fri Jan 25 21:03:33 -0800 2008: > > - at least a cursory effort to not store login credentials in > > plaintext .. how to store them whilst retaining simplicity and > > platform independence is an interesting question. Not sure how far sup > > (or anyone really) wants to go down that particular rabbit hole > > I don't like this idea. I think it was Gaim (now Pidgin) that first > opened my eyes to the possibility that plaintext passwords might not be > so bad. The Pidgin page seems to be down just now, so I can't say for > certain that this is the essay I originally read, but > http://developer.pidgin.im/wiki/PlainTextPasswords?format=txt > sounds like a promising result from Google. Wait, now that I stopped to think about it, I may have to take this back. I don't actually know what credentials you mean, so the argument may not even apply. ~d From daniel@wagner-home.com Sat Jan 26 00:48:49 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Fri, 25 Jan 2008 21:48:49 -0800 Subject: [sup-talk] crash on attachments with ~ Message-ID: <1201326444-sup-243@buckwheat> If I type in a filename that starts with ~ at the attachment prompt, sup crashes. Exception log included. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sup-exception-log.txt Url: http://rubyforge.org/pipermail/sup-talk/attachments/20080125/c61c09e3/attachment.txt From chrisw@rice.edu Sat Jan 26 00:32:09 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Fri, 25 Jan 2008 23:32:09 -0600 Subject: [sup-talk] [PATCH] fixed crasher when refining search and updated keybinding Message-ID: <1201325529-812-1-git-send-email-chrisw@rice.edu> Refine search no longer crashes. Also, the keybinding has been updated to reflect the new global search keybinding. | seems to be a shifted \ on most standard 104-key keyboards. --- lib/sup/modes/search-results-mode.rb | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sup/modes/search-results-mode.rb b/lib/sup/modes/search-results-mode.rb index f64a227..6fdc58a 100644 --- a/lib/sup/modes/search-results-mode.rb +++ b/lib/sup/modes/search-results-mode.rb @@ -9,13 +9,13 @@ class SearchResultsMode < ThreadIndexMode end register_keymap do |k| - k.add :refine_search, "Refine search", '.' + k.add :refine_search, "Refine search", '|' end def refine_search - query = BufferManager.ask :search, "query: ", (@qobj.to_s + " ") + query = BufferManager.ask :search, "refine query: ", (@qobj.to_s + " ") return unless query && query !~ /^\s*$/ - SearchResultsMode.spawn_from_query query, @qopts + SearchResultsMode.spawn_from_query query end ## a proper is_relevant? method requires some way of asking ferret -- 1.5.3.8 From chrisw@rice.edu Fri Jan 25 23:19:25 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Fri, 25 Jan 2008 22:19:25 -0600 Subject: [sup-talk] Persistent "Source Changed" Message-ID: <1201321071-sup-2268@chris-tablet> I am getting a persistent "Source Changed" notification on my IMAP INBOX. No amount of sup-syncing corrects this. I am using the latest git next (as of this composition). I don't quite know where to start figuring out what the issue it. Any help would be appreciated. -- Christopher Warrington From chrisw@rice.edu Fri Jan 25 22:56:33 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Fri, 25 Jan 2008 21:56:33 -0600 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201240480-sup-1977@south> References: <1201240480-sup-1977@south> Message-ID: <1147465793.20080125215633@rice.edu> William Morgan @ 2008-1-24 11:59:43 PM "[sup-talk] 0.5 thoughts" > - IMAP connection sharing +1, shared connections, but still multiple connections (one for polling, one for downloading new messages, one for downloading the currently selected thread, &c.) -- Christopher Warrington "Crash programs fail because they are based on theory that, with nine women pregnant, you can get a baby in a month." -Werner von Braun -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 183 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080125/df0b9917/attachment.bin From manish@gslab.com Sat Jan 26 03:50:34 2008 From: manish@gslab.com (Manish Sapariya) Date: Sat, 26 Jan 2008 14:20:34 +0530 Subject: [sup-talk] Is sup slow on cygwin Message-ID: <479AF45A.6060007@gslab.com> Hi, I am running sup on cygwin and using the mbox file created by Thunderbird 2.0 on windows. I started sup-sync and in almost 2 hours it just indexed 4 messages. The folder that I am indexing has 270 messages and size is around 17MB. Is sup indexing expected to take this much time? when I am running sup-sync or even sup, the CPU spins 100% all the time. In sup-sync output all I see is output like.. === ## 3 (4.83%) read; 0:01:23 elapsed; 0:27:24 remaining ## 5 (4.84%) read; 0:02:31 elapsed; 0:49:35 remaining === What does first number denote? And the remaining time goes very high if I keep running when I kept it running for almost 2 hours, it said remaining time is 61:12:43? Any ideas? Thanks and Regards, Manish From chrisw@rice.edu Sat Jan 26 14:42:36 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Sat, 26 Jan 2008 13:42:36 -0600 Subject: [sup-talk] Is sup slow on cygwin In-Reply-To: <479AF45A.6060007@gslab.com> References: <479AF45A.6060007@gslab.com> Message-ID: <1201376227-sup-7884@chris-tablet> Excerpts from Manish Sapariya's message of Sat Jan 26 02:50:34 -0600 2008: > I am running sup on cygwin and using the mbox file > created by Thunderbird 2.0 on windows. I started > sup-sync and in almost 2 hours it just indexed 4 > messages. > > The folder that I am indexing has 270 messages and > size is around 17MB. > > Is sup indexing expected to take this much time? No. I was able to re-index my entire archive in under four hours. My index is 19800 messages large (or so) and a mix of mbox and IMAP. I have about 450 MB in mbox sources. > when I am running sup-sync or even sup, the CPU spins > 100% all the time. I don't see this at all. Right now, sup's ruby process is idle. > In sup-sync output all I see is > output like.. > === > ## 3 (4.83%) read; 0:01:23 elapsed; 0:27:24 remaining > ## 5 (4.84%) read; 0:02:31 elapsed; 0:49:35 remaining > === > What does first number denote? The number of messages processed. > Any ideas? What version of sup? What version of ruby? What version of Windows? Which ferret gem is installed? -- Christopher Warrington From brabuhr@gmail.com Sat Jan 26 22:35:44 2008 From: brabuhr@gmail.com (brabuhr) Date: Sat, 26 Jan 2008 22:35:44 -0500 Subject: [sup-talk] [PATCH] expand file paths and rescue enoent exceptions when adding attachments In-Reply-To: <21aa9f0801261918j2890aee2yeb52484a95b786c3@mail.gmail.com> References: <21aa9f0801261918j2890aee2yeb52484a95b786c3@mail.gmail.com> Message-ID: <21aa9f0801261935i12a36782o85030b24078e7dd7@mail.gmail.com> On 1/26/08, Daniel Wagner wrote: > If I type in a filename that starts with ~ at the attachment prompt, sup > crashes. --- lib/sup/modes/edit-message-mode.rb | 4 ++++ lib/sup/util.rb | 3 ++- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb index 6a7f273..9412235 100644 --- a/lib/sup/modes/edit-message-mode.rb +++ b/lib/sup/modes/edit-message-mode.rb @@ -151,6 +151,10 @@ EOS @attachments << RMail::Message.make_file_attachment(fn) @attachment_names << fn update + rescue Errno::ENOENT => e + Redwood::log "Cannot add attachment: #{e.message}" + Redwood::log e.backtrace.join("\n") + Redwood::BufferManager.flash "Could not add attachment: #{e.message}" end def delete_attachment diff --git a/lib/sup/util.rb b/lib/sup/util.rb index ceaf0b8..51339d6 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -57,8 +57,9 @@ module RMail class Message def self.make_file_attachment fn bfn = File.basename fn + fp = File.expand_path fn t = MIME::Types.type_for(bfn).first || MIME::Types.type_for ("exe").first - make_attachment IO.read(fn), t.content_type, t.encoding, bfn.to_s + make_attachment IO.read(fp), t.content_type, t.encoding, bfn.to_s end def charset -- 1.5.2.5 -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/sup-talk/attachments/20080126/533da985/attachment.html From manish@gslab.com Sat Jan 26 23:14:44 2008 From: manish@gslab.com (Manish Sapariya) Date: Sun, 27 Jan 2008 09:44:44 +0530 Subject: [sup-talk] Is sup slow on cygwin In-Reply-To: <1201376227-sup-7884@chris-tablet> References: <479AF45A.6060007@gslab.com> <1201376227-sup-7884@chris-tablet> Message-ID: <479C0534.30602@gslab.com> Christopher Warrington wrote: > >> What does first number denote? >> > > The number of messages processed. > Even I thought so initially, but in my case count went above 270 (no. of mails thunderbird showed in the inbox), and the percentage shown was about 5%, and the process was still going on. >> Any ideas? >> > > What version of sup? What version of ruby? What version of Windows? > Which ferret gem is installed - ferret (0.11.6) - sup (0.4) - ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-cygwin] - CYGWIN_NT-5.1 manish 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin - Thunderbird version 2.0.0.9 (20071031) - Windowx XP - 5.1 SP2 Regards, Manish From patroclo7@gmail.com Sun Jan 27 11:16:52 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Sun, 27 Jan 2008 17:16:52 +0100 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201240480-sup-1977@south> References: <1201240480-sup-1977@south> Message-ID: <1201450529-sup-4111@clarabella.clarabella> A thing which I would need (but that I guess it is not easy, at least from the complexity it has in mutt) is support fro S/MIME encryption, or at least encryption verification. -- Giorgio Lando From johnbent@lanl.gov Sun Jan 27 12:01:50 2008 From: johnbent@lanl.gov (John Bent) Date: Sun, 27 Jan 2008 10:01:50 -0700 Subject: [sup-talk] [PATCH] fixed crasher when refining search and updated keybinding In-Reply-To: <1201325529-812-1-git-send-email-chrisw@rice.edu> References: <1201325529-812-1-git-send-email-chrisw@rice.edu> Message-ID: <1201453197-sup-1113@tangerine.lanl.gov> Excerpts from Christopher Warrington's message of Fri Jan 25 22:32:09 -0700 2008: > Refine search no longer crashes. Also, the keybinding has been updated > to reflect the new global search keybinding. | seems to be a shifted \ > on most standard 104-key keyboards. > Refine search is very nice. Something else which might be nice would be a persistent search history which could be scrolled through with the up and down arrow keys. That feature would then include refine search. From marcus-sup@bar-coded.net Sun Jan 27 15:03:54 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sun, 27 Jan 2008 20:03:54 +0000 Subject: [sup-talk] return-path In-Reply-To: <1201246425-sup-9409@magnum> References: <20080123211318.GB31529@manheim.library.drexel.edu> <1201125726-sup-1297@south> <20080123224712.GB32356@manheim.library.drexel.edu> <1201233750-sup-2616@south> <1201246425-sup-9409@magnum> Message-ID: <1201464123-sup-2970@tomsk> On 25.1.2008, Gabriel Sean Farrell wrote: > In other words, all that needs to be done to fix my problem is the > addition of -f to the sendmail call. Maybe it could be an > option in the initial account setup? Even better if this string could written with the to send email as a variable so you could write something like "sendmail -f #{m.from}" ... or somehting like that. Marcus From marcus-sup@bar-coded.net Sun Jan 27 15:07:31 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sun, 27 Jan 2008 20:07:31 +0000 Subject: [sup-talk] [PATCH] modulo the file size in a maildir, so it's <= 7 digits. In-Reply-To: <1201237734-sup-3305@south> References: <1200646334-sup-3256@archie> <1200970931-sup-8284@south> <1201034511-sup-3452@tomsk> <1201065536-sup-7142@south> <1201081580-sup-6798@tomsk> <1201237734-sup-3305@south> Message-ID: <1201464256-sup-4136@tomsk> On 25.1.2008, William Morgan wrote: > I don't think so. I haven't tested this empirically, and Ferret is > pretty darn fast, but it comes down to this: if we have to perform an > operation a number of times that scales linearly with the number of > messages in a mailstore (which unfortunately we do), that operation > shouldn't be something like "do a search on a search engine". Yeah I was forgetting that things like imap have to regenerate them for the whole source. Would be nice if that could be solved somehow, that way making an id would be a one time thing. > > Off on a slight tangent - I cant get any maildir working with sup > > here. I added a maildir to my sources list and it gets scanned as > > expected but nothing gets into the index. I'm wondering whether this > > is as a result of the id function. > > Is this with Jeff's fix for the id? Dont know, will follow up with a new thread when I get back to testing it again. Marcus From marcus-sup@bar-coded.net Sun Jan 27 15:29:00 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Sun, 27 Jan 2008 20:29:00 +0000 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201240480-sup-1977@south> References: <1201240480-sup-1977@south> Message-ID: <1201464716-sup-9988@tomsk> On 25.1.2008, William Morgan wrote: > - Configurable colors. Everyone's favorite. Preferably through a hook that gets some information about what is going to be coloured. For instance I'd like to colour my labels differently (not the email snippet, just the label itself) so the hook would have to be told that it should return a colour for a label, but also what label that is. Same thing applies for recipients/senders/snippets/threads I guess - you need some sort of context with the "type" you're colouring. > - Notes. Like draft emails without a recipient, but treated specially > by the UI. Never sent; just for local use. This would be nice if they extend the message class so you get everything that comes with being an email for free like attachments etc. Marcus From nicolas.pouillard@gmail.com Tue Jan 29 03:40:17 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Tue, 29 Jan 2008 09:40:17 +0100 Subject: [sup-talk] [BUG] When marking a spam, the mail don't disappear Message-ID: <1201596013-sup-3324@port-ext5.ensta.fr> Hi, I've hit a bug when marking a spam in thread-view-mode (using ",s") and then going to inbox (using "x"), the spam seems still there, but in fact it was already deleted, just not remove from the list (hitting "$@" is my current workaroud). TIA, -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 186 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080129/aab21d51/attachment.bin From daniel@wagner-home.com Tue Jan 29 14:33:48 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Tue, 29 Jan 2008 11:33:48 -0800 Subject: [sup-talk] text/html => w3m? Message-ID: <1201635034-sup-9713@buckwheat> Hello, how does sup know to use w3m for text/html attachments? I had a quick grep -R through the code for w3m, and it suggested that this could be achieved with a user hook, but I have a completely empty ~/.sup/hooks. I also thought it might be from some mime-style magic, but ~% xdg-mime query default "text/html" firefox.desktop I'd really like for firefox to be the program used in fact, but I can't see where to change this. ~d P.S. This is strongly related to another desire, to be sent in a new thread. From daniel@wagner-home.com Tue Jan 29 14:47:22 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Tue, 29 Jan 2008 11:47:22 -0800 Subject: [sup-talk] Enter on links Message-ID: <1201636010-sup-8816@buckwheat> Hello! One thing I find myself doing all the time is highlighting a web address and pasting it into Firefox. For long URLs (a sad but common truth), it's even more annoying... hit 'D' to open it up in vim, navigate to the link, Jx a few times, then *finally* copy and paste. Is there a better way to do this? Since I couldn't find any feature like this in the help, I'm going to assume the answer is no. So, here's my real question: how hard would it be for me to allow Enter to try to open a (potentially-multiline) link? I am aware that there are some subtleties about detecting addresses' beginning/ending points here; what I'm really interested in is whether it is easy within sup's architecture. Thanks! ~d From johnbent@lanl.gov Tue Jan 29 14:59:01 2008 From: johnbent@lanl.gov (John Bent) Date: Tue, 29 Jan 2008 12:59:01 -0700 Subject: [sup-talk] text/html => w3m? In-Reply-To: <1201635034-sup-9713@buckwheat> References: <1201635034-sup-9713@buckwheat> Message-ID: <1201636435-sup-5110@tangerine.lanl.gov> Excerpts from Daniel Wagner's message of Tue Jan 29 12:33:48 -0700 2008: > Hello, how does sup know to use w3m for text/html attachments? I had a > quick grep -R through the code for w3m, and it suggested that this could > be achieved with a user hook, but I have a completely empty > ~/.sup/hooks. I also thought it might be from some mime-style magic, > but > > ~% xdg-mime query default "text/html" > firefox.desktop > > I'd really like for firefox to be the program used in fact, but I can't > see where to change this. > You can use a hook 'mime-decode.rb' to cause text/html emails to be correctly rendered within sup. For attachments, sup uses hook 'mime-view.rb'. Since, your hook dir is empty (by the way, it is possible to set the home dir for sup to something besides $HOME/.sup, so you might want to confirm you're running from where you think you are), I believe sup uses /usr/bin/run-mailcap if there is no 'mime-view.rb'. Hope this helps but I'm still learning sup too so this might all be wrong... By the way, I'd like that other request you had also about being able to open links within email bodies. John From daniel@wagner-home.com Tue Jan 29 16:45:22 2008 From: daniel@wagner-home.com (Daniel Wagner) Date: Tue, 29 Jan 2008 13:45:22 -0800 Subject: [sup-talk] text/html => w3m? In-Reply-To: <1201636435-sup-5110@tangerine.lanl.gov> References: <1201635034-sup-9713@buckwheat> <1201636435-sup-5110@tangerine.lanl.gov> Message-ID: <1201642667-sup-6998@buckwheat> Excerpts from John Bent's message of Tue Jan 29 11:59:01 -0800 2008: > you're running from where you think you are), I believe sup uses > /usr/bin/run-mailcap if there is no 'mime-view.rb'. Oh, hey, run-mailcap is really quite nice. Thanks for the tip! I stuck this in my ~/.mailcap, and I'm happy-scrappy now. text/html; /usr/bin/firefox '%s'; edit=gvim '%s'; \ test=test "$DISPLAY" != ""; description="Web Page"; nametemplate=%s.html text/html; /usr/bin/firefox '%s'; edit=gvim '%s'; \ test=test "$DISPLAY" != ""; description="Web Page"; nametemplate=%s.htm text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; \ edit=vim '%s'; description="Web Page"; nametemplate=%s.html text/html; /usr/bin/w3m -T text/html '%s'; needsterminal; \ edit=vim '%s'; description="Web Page"; nametemplate=%s.htm Sadly, this will not work for opening links, as run-mailcap only recognizes files, and not URIs. ~d From brabuhr@gmail.com Tue Jan 29 22:23:31 2008 From: brabuhr@gmail.com (brabuhr) Date: Tue, 29 Jan 2008 22:23:31 -0500 Subject: [sup-talk] [PATCH] first pass at a simple interface to extract URIs from a message Message-ID: <21aa9f0801291923w2df946dbga7832a7345c09a95@mail.gmail.com> On Jan 29, 2008 2:47 PM, Daniel Wagner wrote: > One thing I find myself doing all the time is highlighting a web address > and pasting it into Firefox. This adds a new key binding to the thread-view mode (L) to assist with loading URIs from the body of the message. This first pass will pull the URIs from the message text and loop through them while asking if that URI should be loaded. Currently, there is no code to actually perform the load. --- lib/sup/modes/thread-view-mode.rb | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb index 961fc5d..5fae8fa 100644 --- a/lib/sup/modes/thread-view-mode.rb +++ b/lib/sup/modes/thread-view-mode.rb @@ -1,4 +1,5 @@ require 'open3' +require 'uri' module Redwood class ThreadViewMode < LineCursorMode @@ -48,6 +49,7 @@ EOS k.add :subscribe_to_list, "Subscribe to/unsubscribe from mailing list", "(" k.add :unsubscribe_from_list, "Subscribe to/unsubscribe from mailing list", ")" k.add :pipe_message, "Pipe message or attachment to a shell command", '|' + k.add :follow_link, "Follow a web link", "L" k.add_multi "(a)rchive/(d)elete/mark as (s)pam/mark as u(N)read:", '.' do |kk| kk.add :archive_and_kill, "Archive this thread and kill buffer", 'a' @@ -456,6 +458,34 @@ EOS end end + def follow_link + chunk = @chunk_lines[curpos] + + return unless chunk.is_a?(Chunk::Text) + + uris = URI.extract(chunk.lines.join("\n")).uniq.sort + + if uris.size > 0 + Redwood::log uris.join("\n") + Redwood::BufferManager.flash "#{uris.size} URIs found." + sleep 1 + + uris.each do |uri| + case Redwood::BufferManager.ask_yes_or_no "Load URI: #{uri} (y/n)" + when true + Redwood::BufferManager.flash "" + break + when false + next + else + break + end + end + else + Redwood::BufferManager.flash "No URIs found." + end + end + private def initial_state_for m -- 1.5.2.5 From wmorgan-sup@masanjin.net Tue Jan 29 22:52:00 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 29 Jan 2008 19:52:00 -0800 Subject: [sup-talk] text/html => w3m? In-Reply-To: <1201636435-sup-5110@tangerine.lanl.gov> References: <1201635034-sup-9713@buckwheat> <1201636435-sup-5110@tangerine.lanl.gov> Message-ID: <1201665031-sup-1818@south> Reformatted excerpts from John Bent's message of 2008-01-29: > Hope this helps but I'm still learning sup too so this might all be > wrong... Pretty much right. Sup uses run-mailcap by default, which is where w3m is being picked up on your system. So you can change your mailcap, or you can override the hook. Depends on whether you want this change to be system-wide or specific to Sup. -- William From wmorgan-sup@masanjin.net Tue Jan 29 22:58:15 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Tue, 29 Jan 2008 19:58:15 -0800 Subject: [sup-talk] Enter on links In-Reply-To: <1201636010-sup-8816@buckwheat> References: <1201636010-sup-8816@buckwheat> Message-ID: <1201665171-sup-7233@south> Reformatted excerpts from Daniel Wagner's message of 2008-01-29: > One thing I find myself doing all the time is highlighting a web > address and pasting it into Firefox. For long URLs (a sad but common > truth), it's even more annoying... hit 'D' to open it up in vim, > navigate to the link, Jx a few times, then *finally* copy and paste. > Is there a better way to do this? On my system this is actually handled by the terminal (I'm using gnome-terminal) directly. You can click on any link and it launches the default web browser. > So, here's my real question: how hard would it be for me to allow > Enter to try to open a (potentially-multiline) link? I am aware that > there are some subtleties about detecting addresses' beginning/ending > points here; what I'm really interested in is whether it is easy > within sup's architecture. Fairly easy, with some caveats. Sup is fundamentally line-based, at least at this point. A URL-detecting regex could pick out individual URLs from the message, pack them into their own kind of Chunk (see message-chunks.rb) the same way that quoted regions and attachments are handled, and the rest would follow more or less trivially. That might make the email look a little weird, as any URLs would sit on their own line. But Sup has never shied away from reformatting emails for display. :) -- William From its.jeff.balogh@gmail.com Wed Jan 30 03:21:18 2008 From: its.jeff.balogh@gmail.com (Jeff Balogh) Date: Wed, 30 Jan 2008 03:21:18 -0500 Subject: [sup-talk] [PATCH] don't try to open the next thread if there isn't one available Message-ID: <1201681010-sup-3463@archie> When you're on the last thread of a ThreadSet and press ',', nothing happens, but you can't '.' since @dying == true. This patch changes :next to :kill if there is no next thread. --- I usually traverse my inbox with ',a', so it annoys me when sup gets stuck on the last thread. This patch implements what I expect to happen: the thread is killed and the previous buffer pops up. lib/sup/modes/thread-index-mode.rb | 4 ++++ lib/sup/modes/thread-view-mode.rb | 2 ++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb index 7686098..d6c1b21 100644 --- a/lib/sup/modes/thread-index-mode.rb +++ b/lib/sup/modes/thread-index-mode.rb @@ -121,6 +121,10 @@ EOS select t, b end + + def has_thread_after thread + @lines[thread] < @threads.length - 1 + end def handle_single_message_labeled_update sender, m ## no need to do anything different here; we don't differentiate diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb index 961fc5d..e79e410 100644 --- a/lib/sup/modes/thread-view-mode.rb +++ b/lib/sup/modes/thread-view-mode.rb @@ -416,6 +416,8 @@ EOS return if @dying @dying = true + op = :kill unless @index_mode.has_thread_after(@thread) + case op when :next @index_mode.launch_next_thread_after(@thread) do -- 1.5.3.7 From nicolas.pouillard@gmail.com Wed Jan 30 04:21:28 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Wed, 30 Jan 2008 10:21:28 +0100 Subject: [sup-talk] Enter on links In-Reply-To: <1201636010-sup-8816@buckwheat> References: <1201636010-sup-8816@buckwheat> Message-ID: <1201684735-sup-6012@ausone.inria.fr> Excerpts from Daniel Wagner's message of Tue Jan 29 20:47:22 +0100 2008: > Hello! > > One thing I find myself doing all the time is highlighting a web address > and pasting it into Firefox. For long URLs (a sad but common truth), > it's even more annoying... hit 'D' to open it up in vim, navigate to the > link, Jx a few times, then *finally* copy and paste. Is there a better > way to do this? Since I couldn't find any feature like this in the > help, I'm going to assume the answer is no. Concerning multiline links, I've hacked sup to don't wrap at 80 columns but at 160. This fixes the problem at least when the mail has not been wrapped by the sender. -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 186 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080130/5a26c0cd/attachment.bin From manish@gslab.com Wed Jan 30 08:14:00 2008 From: manish@gslab.com (Manish Sapariya) Date: Wed, 30 Jan 2008 18:44:00 +0530 Subject: [sup-talk] exception when pressing page down (Space) when sup was loading Message-ID: <47A07818.2040608@gslab.com> I ran into following exception when I start sup and immediately press Space multiple times. Regards, Manish [manish at alioth ~]$ sup [Wed Jan 30 18:40:29 +0530 2008] using character set encoding "UTF-8" [Wed Jan 30 18:40:29 +0530 2008] locking /home/manish/.sup/lock... [Wed Jan 30 18:40:29 +0530 2008] crypto: detected gpg binary in /usr/bin/gpg [Wed Jan 30 18:40:29 +0530 2008] loading index... [Wed Jan 30 18:40:29 +0530 2008] loaded index of 8107 messages [Wed Jan 30 18:40:29 +0530 2008] starting curses [Wed Jan 30 18:40:36 +0530 2008] stopped cursing [Wed Jan 30 18:40:36 +0530 2008] oh crap, an exception [Wed Jan 30 18:40:36 +0530 2008] unlocking /home/manish/.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 ---------------------------------------------------------------- --- EOFError from thread: load threads for thread-index-mode End-of-File Error occured at :93 in xraise Error occured in compound_io.c:137 - cmpdi_read_i Tried to read past end of file. File length is <1000> and tried to read to <3252949> /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:224:in `default' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:224:in `[]' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:224:in `each_id_by_date' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:224:in `each' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:224:in `each_id_by_date' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/thread.rb:326:in `load_n_threads' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:462:in `__unprotected_load_n_threads' (eval):12:in `load_n_threads' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:451:in `load_n_threads_background' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup.rb:60:in `reporting_thread' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup.rb:58:in `initialize' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup.rb:58:in `new' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup.rb:58:in `reporting_thread' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:450:in `load_n_threads_background' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:501:in `__unprotected_load_threads' (eval):12:in `load_threads' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/thread-index-mode.rb:64:in `initialize' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/line-cursor-mode.rb:177:in `call' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/line-cursor-mode.rb:177:in `call_load_more_callbacks' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/line-cursor-mode.rb:177:in `each' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/line-cursor-mode.rb:177:in `call_load_more_callbacks' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/line-cursor-mode.rb:80:in `cursor_down' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/mode.rb:49:in `send' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/mode.rb:49:in `handle_input' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:231:in `handle_input' /usr/lib/ruby/gems/1.8/gems/sup-0.4/bin/sup:218 /usr/bin/sup:16:in `load' /usr/bin/sup:16 --- SystemExit from thread: main End-of-File Error occured at :93 in xraise Error occured in compound_io.c:137 - cmpdi_read_i Tried to read past end of file. File length is <1000> and tried to read to <3252949> /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup.rb:64:in `pass' /usr/lib/ruby/1.8/monitor.rb:231:in `mon_exit' /usr/lib/ruby/1.8/monitor.rb:244:in `synchronize' /usr/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:580:in `size' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/index.rb:212:in `size' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `send' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/util.rb:497:in `method_missing' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/inbox-mode.rb:52:in `status' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:727:in `get_status_and_title' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:263:in `draw_screen' /usr/lib/ruby/gems/1.8/gems/sup-0.4/bin/sup:283 /usr/bin/sup:16:in `load' /usr/bin/sup:16 [manish at alioth ~]$ From manish@gslab.com Wed Jan 30 08:39:12 2008 From: manish@gslab.com (Manish Sapariya) Date: Wed, 30 Jan 2008 19:09:12 +0530 Subject: [sup-talk] Exception when refining query Message-ID: <47A07E00.9080702@gslab.com> Use case: search all mails using F expression is to:mail at a.com. Press . to refine the query and I added "OR cc:mail at a.com" and it crashed Regards, Manish [manish at alioth ~]$ sup [Wed Jan 30 18:44:59 +0530 2008] using character set encoding "UTF-8" [Wed Jan 30 18:44:59 +0530 2008] locking /home/manish/.sup/lock... [Wed Jan 30 18:44:59 +0530 2008] crypto: detected gpg binary in /usr/bin/gpg [Wed Jan 30 18:44:59 +0530 2008] loading index... [Wed Jan 30 18:44:59 +0530 2008] loaded index of 8098 messages [Wed Jan 30 18:44:59 +0530 2008] starting curses [Wed Jan 30 19:06:44 +0530 2008] stopped cursing [Wed Jan 30 19:06:44 +0530 2008] oh crap, an exception [Wed Jan 30 19:06:44 +0530 2008] unlocking /home/manish/.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 ---------------------------------------------------------------- --- ArgumentError from thread: main wrong number of arguments (2 for 1) /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/search-results-mode.rb:18:in `spawn_from_query' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/modes/search-results-mode.rb:18:in `refine_search' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/mode.rb:49:in `send' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/mode.rb:49:in `handle_input' /usr/lib/ruby/gems/1.8/gems/sup-0.4/lib/sup/buffer.rb:231:in `handle_input' /usr/lib/ruby/gems/1.8/gems/sup-0.4/bin/sup:218 /usr/bin/sup:16:in `load' /usr/bin/sup:16 [manish at alioth ~]$ From manish@gslab.com Wed Jan 30 08:45:21 2008 From: manish@gslab.com (Manish Sapariya) Date: Wed, 30 Jan 2008 19:15:21 +0530 Subject: [sup-talk] what would be the best way to archive certain messages Message-ID: <47A07F71.3010208@gslab.com> Hi, I dont want all the list messages in my inbox. How can I do it using hooks? Is there any message specific interface or property which I can manipulate in before-add-message hook? Thanks and Regards, Manish From johnbent@lanl.gov Wed Jan 30 10:43:33 2008 From: johnbent@lanl.gov (John Bent) Date: Wed, 30 Jan 2008 08:43:33 -0700 Subject: [sup-talk] [PATCH] don't try to open the next thread if there isn't one available In-Reply-To: <1201681010-sup-3463@archie> References: <1201681010-sup-3463@archie> Message-ID: <1201707688-sup-6637@tangerine.lanl.gov> Excerpts from its.jeff.balogh's message of Wed Jan 30 01:21:18 -0700 2008: > When you're on the last thread of a ThreadSet and press ',', > nothing happens, but you can't '.' since @dying == true. This > patch changes :next to :kill if there is no next thread. > --- > I usually traverse my inbox with ',a', so it annoys me when sup gets stuck on > the last thread. This patch implements what I expect to happen: the thread is > killed and the previous buffer pops up. > Perhaps I should just change my habits but I like to traverse my inbox in chronological order (i.e. bottom up instead of top down). If anyone could make a patch that does ,a or ,n but moves it up instead of down, I'd very much appreciate it. By the way, I finally figured out what n and p are for in thread-view mode. They are really very nice. The auto-topping and auto-margin positioning are very slick. John From johnbent@lanl.gov Wed Jan 30 11:09:04 2008 From: johnbent@lanl.gov (John Bent) Date: Wed, 30 Jan 2008 09:09:04 -0700 Subject: [sup-talk] what would be the best way to archive certain messages In-Reply-To: <47A07F71.3010208@gslab.com> References: <47A07F71.3010208@gslab.com> Message-ID: <1201709055-sup-5205@tangerine.lanl.gov> Excerpts from Manish Sapariya's message of Wed Jan 30 06:45:21 -0700 2008: > Hi, > I dont want all the list messages in my inbox. How can I do it using hooks? > Is there any message specific interface or property which I can manipulate > in before-add-message hook? > Hey Manish, Currently the before-add-message hook can only apply labels but cannot be used to archive messages. To automatically archive messages, they must be in a different source. I achieved this by using fetchmail to pull my mail and procmail to filter some messages to different mboxes. I then used 'sup-add --archive' for those new mboxes. John From marcus-sup@bar-coded.net Wed Jan 30 11:26:36 2008 From: marcus-sup@bar-coded.net (Marcus Williams) Date: Wed, 30 Jan 2008 16:26:36 +0000 Subject: [sup-talk] what would be the best way to archive certain messages In-Reply-To: <1201709055-sup-5205@tangerine.lanl.gov> References: <47A07F71.3010208@gslab.com> <1201709055-sup-5205@tangerine.lanl.gov> Message-ID: <1201710383-sup-6775@tomsk> On 30.1.2008, John Bent wrote: > Currently the before-add-message hook can only apply labels but cannot be used > to archive messages. message.remove_label :inbox ... works for me :) Marcus From wmorgan-sup@masanjin.net Wed Jan 30 12:14:42 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 30 Jan 2008 09:14:42 -0800 Subject: [sup-talk] NoMethodError running sup-config In-Reply-To: References: <1201220266-sup-191@south> Message-ID: <1201713052-sup-6822@south> Reformatted excerpts from Sho Fukamachi's message of 2008-01-25: > Great, I cloned it and ran from there. The problem is fixed, but > exposed another problem when it tried to do a sup-add, which also > errored out. I was able, however, to do the sup-add manually without > further issue. If you have the backtrace, I'd be happy to take a look. > Anyway, thanks for your help! I really like sup .. it's a joy to use. Glad to hear it! > One more thing: there seem to be pretty severe display errors when I > display (and scroll through) japanese mail. I'm not really sure how to > go about troubleshooting what's wrong. Shall I make a new thread here, > or send you the mail I have in mind which exposes the problem > directly? The problem is that the Ruby ncurses library doesn't have wide character support. So non-ASCII characters should appear, if the locale is detected correctly, but ncurses will be completely confused every time it prints a wide character because it expects the character to have taken multiple columns whereas the terminal interpreted it as only one. At least, that's my limited understanding of the issue. There was some preliminary work at recompiling the ruby ncurses library to enable wide characters here: http://rubyforge.org/pipermail/sup-talk/2007-October/000297.html -- William From wmorgan-sup@masanjin.net Wed Jan 30 12:24:12 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 30 Jan 2008 09:24:12 -0800 Subject: [sup-talk] char. encoding problems - garbled output In-Reply-To: <1201262947-sup-9132@sieni> References: <478F4F67.1040405@iki.fi> <1200763427-sup-2564@south> <1201262947-sup-9132@sieni> Message-ID: <1201713747-sup-9771@south> Reformatted excerpts from Marko Myllym?ki's message of 2008-01-25: > Sorry, I'm really Sup-newbie and I don't know how to apply these > patches yet :) ... figuring it out later. That change went out in the 0.4 release, so hopefully 0.4 will work for you. -- William From wmorgan-sup@masanjin.net Wed Jan 30 12:29:30 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 30 Jan 2008 09:29:30 -0800 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201307667-sup-2659@tangerine.lanl.gov> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> <1201218489-sup-3542@tangerine.lanl.gov> <1201220092-sup-8263@south> <1201222453-sup-1190@spooky.local> <1201235901-sup-7426@tangerine.lanl.gov> <1201307667-sup-2659@tangerine.lanl.gov> Message-ID: <1201714011-sup-6178@south> Reformatted excerpts from John Bent's message of 2008-01-25: > The hook works (system "open \'#{filename}\'"), but sup thinks it is > failing. I get a message saying view failed, displaying as text. > Maybe it should be (! system "open \'#{filename}\'") ? Weird. Kernel#system returns true if the command succeeded and false otherwise, so it should work as is. You could try: system "open '#{filename}'" $?.success? But there's no reason that should work and the original shouldn't. You don't have a debugging print statement or anything like that as the final line of the hook, do you? > Also, I added the \' because I noticed before that sometimes filename > has spaces in it and then open won't work. Good point. Backslashes optional though. :) -- William From wmorgan-sup@masanjin.net Wed Jan 30 12:38:05 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 30 Jan 2008 09:38:05 -0800 Subject: [sup-talk] Persistent "Source Changed" In-Reply-To: <1201321071-sup-2268@chris-tablet> References: <1201321071-sup-2268@chris-tablet> Message-ID: <1201714217-sup-7409@south> Reformatted excerpts from Christopher Warrington's message of 2008-01-25: > I am getting a persistent "Source Changed" notification on my IMAP > INBOX. No amount of sup-syncing corrects this. Hm. Just to confirm, are you using sup-sync --changed? And this is an IMAP folder that worked before? Is it an Exchange folder, by any chance? > I don't quite know where to start figuring out what the issue it. Any > help would be appreciated. If you want to play around in the code a bit, you can try and figure out where in imap.rb the OutOfSyncSourceError is being thrown. That should make it easy to figure out why Sup thinks it's out of sync. -- William From johnbent@lanl.gov Wed Jan 30 12:54:22 2008 From: johnbent@lanl.gov (John Bent) Date: Wed, 30 Jan 2008 10:54:22 -0700 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201714011-sup-6178@south> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> <1201218489-sup-3542@tangerine.lanl.gov> <1201220092-sup-8263@south> <1201222453-sup-1190@spooky.local> <1201235901-sup-7426@tangerine.lanl.gov> <1201307667-sup-2659@tangerine.lanl.gov> <1201714011-sup-6178@south> Message-ID: <1201715536-sup-6254@tangerine.lanl.gov> Excerpts from William Morgan's message of Wed Jan 30 10:29:30 -0700 2008: > Reformatted excerpts from John Bent's message of 2008-01-25: > > The hook works (system "open \'#{filename}\'"), but sup thinks it is > > failing. I get a message saying view failed, displaying as text. > > Maybe it should be (! system "open \'#{filename}\'") ? > > Weird. Kernel#system returns true if the command succeeded and false > otherwise, so it should work as is. > > You could try: > system "open '#{filename}'" > $?.success? > same problem. the attachment is successfully opened but sup thinks it failed and sup displays it as text. > But there's no reason that should work and the original shouldn't. You > don't have a debugging print statement or anything like that as the > final line of the hook, do you? > nope, just the exact two lines you supplied above. I wonder if the problem is that system isn't correctly understanding the return value from open? tangerine:~>open K.png tangerine:~>echo $? 0 hmmm, I would think 0 is the expected success value? How could I reverse true and false? I'm curious to try that but ! $?.success? $?.success?true:false don't work, they error out and sup defaults to run-mailcap. John From johnbent@lanl.gov Wed Jan 30 13:05:20 2008 From: johnbent@lanl.gov (John Bent) Date: Wed, 30 Jan 2008 11:05:20 -0700 Subject: [sup-talk] can't remove draft label Message-ID: <1201716067-sup-3586@tangerine.lanl.gov> I had two messages that weren't drafts that kept showing up with draft labels on them. I removed everything from the .sup/drafts folder - no change. I did 'sup-tweak-labels --remove draft' on my mbox, it said: Scanned 13 / 13 messages and changed 13. At which point, I restarted sup and found that one of the two falsely labeled drafts was removed. But there's still one. I retried the sup-tweak-labels but to no avail. draft is not a user supplied label so just editing the message labels doesn't work. The thread that is marked as a draft does not have a draft anywhere in it (i.e. I skip to each message and hit 'e' but it always says, "this isn't a draft"). Any ideas? Thanks! From wmorgan-sup@masanjin.net Wed Jan 30 13:26:03 2008 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 30 Jan 2008 10:26:03 -0800 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201715536-sup-6254@tangerine.lanl.gov> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> <1201218489-sup-3542@tangerine.lanl.gov> <1201220092-sup-8263@south> <1201222453-sup-1190@spooky.local> <1201235901-sup-7426@tangerine.lanl.gov> <1201307667-sup-2659@tangerine.lanl.gov> <1201714011-sup-6178@south> <1201715536-sup-6254@tangerine.lanl.gov> Message-ID: <1201717294-sup-1892@south> Reformatted excerpts from John Bent's message of 2008-01-30: > I wonder if the problem is that system isn't correctly understanding > the return value from open? Try with irb: $ irb irb(main):001:0> system "ls" [...] => true irb(main):002:0> system "asdfasdfa" => false What happens with open? > hmmm, I would think 0 is the expected success value? How could I reverse > true and false? I'm curious to try that but > ! $?.success? This one should work. As a sanity check: system "open '#{filename}'" true Should always count as a success. Is that true? -- William From johnbent@lanl.gov Wed Jan 30 13:35:22 2008 From: johnbent@lanl.gov (John Bent) Date: Wed, 30 Jan 2008 11:35:22 -0700 Subject: [sup-talk] missing run-mailcap In-Reply-To: <1201717294-sup-1892@south> References: <1201019996-sup-8960@tangerine.lanl.gov> <1201041081-sup-6034@tangerine.lanl.gov> <1201210323-sup-6116@tangerine.lanl.gov> <1201216741-sup-4105@south> <1201218489-sup-3542@tangerine.lanl.gov> <1201220092-sup-8263@south> <1201222453-sup-1190@spooky.local> <1201235901-sup-7426@tangerine.lanl.gov> <1201307667-sup-2659@tangerine.lanl.gov> <1201714011-sup-6178@south> <1201715536-sup-6254@tangerine.lanl.gov> <1201717294-sup-1892@south> Message-ID: <1201718069-sup-9900@tangerine.lanl.gov> Excerpts from William Morgan's message of Wed Jan 30 11:26:03 -0700 2008: > Reformatted excerpts from John Bent's message of 2008-01-30: > > I wonder if the problem is that system isn't correctly understanding > > the return value from open? > > Try with irb: > > $ irb > irb(main):001:0> system "ls" > [...] > => true > irb(main):002:0> system "asdfasdfa" > => false > > What happens with open? > => true > > hmmm, I would think 0 is the expected success value? How could I reverse > > true and false? I'm curious to try that but > > ! $?.success? > > This one should work. > > As a sanity check: > system "open '#{filename}'" > true > > Should always count as a success. Is that true? > same problem. It opens successfully, but sup thinks it doesn't and displays it as text. All I see in the log buffer is: hook: read 'mime-view' from /Users/johnbent/.sup/hooks/mime-view.rb Ah. But system "open '#{filename}'" false works perfectly! (not sure that's expected but I'm happy!) Thanks, John From chrisw@rice.edu Wed Jan 30 13:38:54 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Wed, 30 Jan 2008 12:38:54 -0600 Subject: [sup-talk] Persistent "Source Changed" In-Reply-To: <1201714217-sup-7409@south> References: <1201321071-sup-2268@chris-tablet> <1201714217-sup-7409@south> Message-ID: <1201717946-sup-1579@chris-tablet> Excerpts from William Morgan's message of Wed Jan 30 11:38:05 -0600 2008: >> I am getting a persistent "Source Changed" notification on my IMAP >> INBOX. No amount of sup-syncing corrects this. > Hm. Just to confirm, are you using sup-sync --changed? And this is an > IMAP folder that worked before? Is it an Exchange folder, by any chance? Yup, sup-sync --changed imaps://server.tld/Path/to/Folder I'm pretty sure that it is a Cyrus server: http://cyrusimap.web.cmu.edu/ >> I don't quite know where to start figuring out what the issue it. Any >> help would be appreciated. > If you want to play around in the code a bit, you can try and figure out > where in imap.rb the OutOfSyncSourceError is being thrown. That should > make it easy to figure out why Sup thinks it's out of sync. It has stopped, but the next time it happens (it has stopped are restarted twice now) I'll take a look. Thanks for the pointer. -- Christopher Warrington From its.jeff.balogh@gmail.com Wed Jan 30 18:05:40 2008 From: its.jeff.balogh@gmail.com (Jeff Balogh) Date: Wed, 30 Jan 2008 18:05:40 -0500 Subject: [sup-talk] [PATCH] don't try to open the next thread if there isn't one available In-Reply-To: <1201681010-sup-3463@archie> References: <1201681010-sup-3463@archie> Message-ID: <1201732604-sup-4815@archie> Jeff Balogh wrote: > When you're on the last thread of a ThreadSet and press ',', > nothing happens, but you can't '.' since @dying == true. This > patch changes :next to :kill if there is no next thread. > --- > I usually traverse my inbox with ',a', so it annoys me when sup gets stuck on > the last thread. This patch implements what I expect to happen: the thread is > killed and the previous buffer pops up. Ok, this patch causes a no block given exception with ',n' on the last thread. As you might expect, no block is given with the do nothing command. Here's where it's happening: def dispatch op return if @dying @dying = true op = :kill unless @index_mode.has_thread_after(@thread) case op when :next @index_mode.launch_next_thread_after(@thread) do @thread.save Index if block_given? && yield BufferManager.kill_buffer_safely buffer end when :kill @thread.save Index if yield BufferManager.kill_buffer_safely buffer else raise ArgumentError, "unknown thread dispatch operation #{op.inspect}" end end The :next case guards against this exception with 'if block_given? && yield'. If I put that in the :kill case, those two lines will be exact duplicates of the lines above. Is there a clean way to handle this? I'm learning Ruby as I go along, so please forgive me if the answer is obvious. From vasudeva@linkswarm.com Wed Jan 30 19:29:17 2008 From: vasudeva@linkswarm.com (vasudeva) Date: Wed, 30 Jan 2008 19:29:17 -0500 Subject: [sup-talk] Enter on links In-Reply-To: <1201684735-sup-6012@ausone.inria.fr> References: <1201636010-sup-8816@buckwheat> <1201684735-sup-6012@ausone.inria.fr> Message-ID: <1201739282-sup-912@lenin> Excerpts from Nicolas Pouillard's message of Wed Jan 30 04:21:28 -0500 2008: > Concerning multiline links, I've hacked sup to don't wrap at 80 columns but > at 160. This fixes the problem at least when the mail has not been wrapped by > the sender. Care to share? I'd like to see this so I can figure out a way to make sup wrap where I want to. -- linkswarm.com :: Collaborative Insolence vasudeva.linkswarm.com/gallery :: For The Faint of Heart From chrisw@rice.edu Wed Jan 30 23:09:51 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Wed, 30 Jan 2008 22:09:51 -0600 Subject: [sup-talk] Exception when refining query In-Reply-To: <47A07E00.9080702@gslab.com> References: <47A07E00.9080702@gslab.com> Message-ID: <1201752455-sup-9917@chris-tablet> Excerpts from Manish Sapariya's message of Wed Jan 30 07:39:12 -0600 2008: > Use case: > search all mails using F expression is to:mail at a.com. > Press . to refine the query and I added "OR cc:mail at a.com" > and it crashed I submitted a patch for this a while ago. See: http://rubyforge.org/pipermail/sup-talk/2008-January/001046.html -- Christopher Warrington From chrisw@rice.edu Wed Jan 30 23:36:09 2008 From: chrisw@rice.edu (Christopher Warrington) Date: Wed, 30 Jan 2008 22:36:09 -0600 Subject: [sup-talk] can't remove draft label In-Reply-To: <1201716067-sup-3586@tangerine.lanl.gov> References: <1201716067-sup-3586@tangerine.lanl.gov> Message-ID: <1201754138-sup-7276@chris-tablet> Excerpts from John Bent's message of Wed Jan 30 12:05:20 -0600 2008: > I had two messages that weren't drafts that kept showing up with > draft labels on them. I removed everything from the .sup/drafts > folder - no change. I did 'sup-tweak-labels --remove draft' on my > mbox, it said: > > Scanned 13 / 13 messages and changed 13. > > At which point, I restarted sup and found that one of the two falsely > labeled drafts was removed. But there's still one. I retried the > sup-tweak-labels but to no avail. draft is not a user supplied label > so just editing the message labels doesn't work. The thread that is > marked as a draft does not have a draft anywhere in it (i.e. I skip to > each message and hit 'e' but it always says, "this isn't a draft"). > > Any ideas? Thanks! Try sup-sync --changed sup://drafts -- Christopher Warrington From johnbent@lanl.gov Thu Jan 31 01:08:09 2008 From: johnbent@lanl.gov (John Bent) Date: Wed, 30 Jan 2008 23:08:09 -0700 Subject: [sup-talk] can't remove draft label In-Reply-To: <1201754138-sup-7276@chris-tablet> References: <1201716067-sup-3586@tangerine.lanl.gov> <1201754138-sup-7276@chris-tablet> Message-ID: <1201759596-sup-4274@tangerine.lanl.gov> Excerpts from Christopher Warrington's message of Wed Jan 30 21:36:09 -0700 2008: > Excerpts from John Bent's message of Wed Jan 30 12:05:20 -0600 2008: > > I had two messages that weren't drafts that kept showing up with > > draft labels on them. I removed everything from the .sup/drafts > > folder - no change. I did 'sup-tweak-labels --remove draft' on my > > mbox, it said: > > > > Scanned 13 / 13 messages and changed 13. > > > > At which point, I restarted sup and found that one of the two falsely > > labeled drafts was removed. But there's still one. I retried the > > sup-tweak-labels but to no avail. draft is not a user supplied label > > so just editing the message labels doesn't work. The thread that is > > marked as a draft does not have a draft anywhere in it (i.e. I skip to > > each message and hit 'e' but it always says, "this isn't a draft"). > > > > Any ideas? Thanks! > > Try > > sup-sync --changed sup://drafts > Thanks so much for the suggestion. :) I thought it worked because I saw this message: Deleting missing messages from the index... Deleted 1 / 1 messages But that was just the message I'd previously deleted from the drafts dir. The false draft is still there... From manish@gslab.com Thu Jan 31 01:24:37 2008 From: manish@gslab.com (Manish Sapariya) Date: Thu, 31 Jan 2008 11:54:37 +0530 Subject: [sup-talk] OR query does not yield any result Message-ID: <47A169A5.30801@gslab.com> Hi, when I press F and give query as "manish OR nobodypqr" it does not yield any result. However I do get results when I query the index using devel./console.sh. Is this know issue or am I missing something? Thanks and Regards, Manish From nicolas.pouillard@gmail.com Thu Jan 31 06:58:13 2008 From: nicolas.pouillard@gmail.com (Nicolas Pouillard) Date: Thu, 31 Jan 2008 12:58:13 +0100 Subject: [sup-talk] Enter on links In-Reply-To: <1201739282-sup-912@lenin> References: <1201636010-sup-8816@buckwheat> <1201684735-sup-6012@ausone.inria.fr> <1201739282-sup-912@lenin> Message-ID: <1201780634-sup-8788@ausone.inria.fr> Excerpts from vasudeva's message of Thu Jan 31 01:29:17 +0100 2008: > Excerpts from Nicolas Pouillard's message of Wed Jan 30 04:21:28 -0500 2008: > > Concerning multiline links, I've hacked sup to don't wrap at 80 columns but > > at 160. This fixes the problem at least when the mail has not been wrapped by > > the sender. > > Care to share? I'd like to see this so I can figure out a way to make > sup wrap where I want to. That's not really clean and produce a warning the first time. I've added this line to one of my hooks (after-poll.rb) Redwood::Chunk::Text.const_set :WRAP_LEN, 160 unless Redwood::Chunk::Text::WRAP_LEN == 160 -- Nicolas Pouillard aka Ertai -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 232 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080131/911bc2df/attachment.bin From patroclo7@gmail.com Thu Jan 31 08:24:28 2008 From: patroclo7@gmail.com (Giorgio Lando) Date: Thu, 31 Jan 2008 14:24:28 +0100 Subject: [sup-talk] 0.5 thoughts In-Reply-To: <1201260309-sup-8211@ausone.local> References: <1201240480-sup-1977@south> <288A3057-1B27-4BDF-9B96-F860CA73C305@gmail.com> <1201260309-sup-8211@ausone.local> Message-ID: <1201785683-sup-4356@clarabella.clarabella> I would like to add a further feature request: sup could accept an email address as a command line argument, going directly to prompt for a subject or a CC and then passing to the editor. This would be nice for interaction with browsers, when clicking on a certain address open a program designated to treat the mailto protocol. -- Giorgio Lando From itaylor@uark.edu Thu Jan 31 13:27:01 2008 From: itaylor@uark.edu (Ian Taylor) Date: Thu, 31 Jan 2008 13:27:01 -0500 Subject: [sup-talk] [PATCH] spelling error Message-ID: <1201803937-sup-5871@red> -- Ian Taylor -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-sepuku-seppuku.patch Type: application/octet-stream Size: 957 bytes Desc: not available Url : http://rubyforge.org/pipermail/sup-talk/attachments/20080131/b924304f/attachment.obj