From wmorgan-sup at masanjin.net Wed Jan 2 12:50:39 2008 From: wmorgan-sup at 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 at masanjin.net Wed Jan 2 13:13:14 2008 From: wmorgan-sup at 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 at masanjin.net Fri Jan 4 00:04:53 2008 From: wmorgan-sup at 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 at gmail.com Fri Jan 4 17:54:48 2008 From: patroclo7 at 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 at gmail.com Fri Jan 4 18:45:05 2008 From: patroclo7 at 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 at gmail.com Fri Jan 4 18:59:41 2008 From: patroclo7 at 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 at gmail.com Fri Jan 4 19:02:29 2008 From: fedzor at 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 at gmail.com Fri Jan 4 19:13:46 2008 From: patroclo7 at 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 at masanjin.net Fri Jan 4 19:09:55 2008 From: wmorgan-sup at 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 at masanjin.net Fri Jan 4 19:13:15 2008 From: wmorgan-sup at 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 at masanjin.net Fri Jan 4 19:15:54 2008 From: wmorgan-sup at 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 at gmail.com Fri Jan 4 19:57:26 2008 From: patroclo7 at 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 at gmail.com Fri Jan 4 20:01:14 2008 From: patroclo7 at 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 at gmail.com Sat Jan 5 07:58:50 2008 From: patroclo7 at 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 at gmail.com Sat Jan 5 09:49:02 2008 From: fedzor at 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 at gmail.com Sat Jan 5 09:51:38 2008 From: fedzor at 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 at gmail.com Sat Jan 5 12:11:10 2008 From: patroclo7 at 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 at masanjin.net Sat Jan 5 13:33:14 2008 From: wmorgan-sup at 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 at masanjin.net Sat Jan 5 13:34:47 2008 From: wmorgan-sup at 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 at masanjin.net Sat Jan 5 13:37:12 2008 From: wmorgan-sup at 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 at masanjin.net Sat Jan 5 13:43:51 2008 From: wmorgan-sup at 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 at gmail.com Sat Jan 5 13:52:11 2008 From: fedzor at 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 at gmail.com Sat Jan 5 14:29:40 2008 From: fedzor at 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 at bar-coded.net Sat Jan 5 15:11:14 2008 From: marcus-sup at 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 at linkswarm.com Sat Jan 5 14:38:56 2008 From: vasudeva at 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 at gmail.com Sat Jan 5 16:32:26 2008 From: patroclo7 at 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 at gmail.com Sat Jan 5 16:46:43 2008 From: patroclo7 at 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 at gmail.com Sat Jan 5 16:58:44 2008 From: fedzor at 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 at gmail.com Sat Jan 5 17:00:06 2008 From: fedzor at 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 at bar-coded.net Sat Jan 5 17:01:22 2008 From: marcus-sup at 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 at bar-coded.net Sat Jan 5 17:04:22 2008 From: marcus-sup at 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 at gmail.com Sat Jan 5 17:14:00 2008 From: ingmar.stdin at 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 at gmail.com Sun Jan 6 06:25:52 2008 From: patroclo7 at 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 at bar-coded.net Sun Jan 6 07:27:16 2008 From: marcus-sup at 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 at masanjin.net Sun Jan 6 14:46:44 2008 From: wmorgan-sup at 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 at gmail.com Sun Jan 6 17:34:46 2008 From: fedzor at 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 at gmail.com Sun Jan 6 17:54:03 2008 From: patroclo7 at 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 at masanjin.net Mon Jan 7 00:56:53 2008 From: wmorgan-sup at 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 at masanjin.net Mon Jan 7 01:04:21 2008 From: wmorgan-sup at 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 at masanjin.net Mon Jan 7 01:15:57 2008 From: wmorgan-sup at 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 at masanjin.net Mon Jan 7 01:17:05 2008 From: wmorgan-sup at 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 at gmail.com Mon Jan 7 03:44:39 2008 From: patroclo7 at 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 at gmail.com Mon Jan 7 03:51:08 2008 From: patroclo7 at 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 at bar-coded.net Mon Jan 7 07:35:20 2008 From: marcus-sup at 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 at gmail.com Mon Jan 7 17:59:01 2008 From: patroclo7 at 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 at masanjin.net Mon Jan 7 19:12:08 2008 From: wmorgan-sup at 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 at gmail.com Mon Jan 7 19:22:00 2008 From: patroclo7 at 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 at gmail.com Mon Jan 7 20:34:02 2008 From: nicolas.pouillard at 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 at gmail.com Mon Jan 7 20:40:44 2008 From: nicolas.pouillard at 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 at gmail.com Mon Jan 7 20:42:56 2008 From: nicolas.pouillard at 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 at gmail.com Mon Jan 7 20:43:51 2008 From: nicolas.pouillard at 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 at gmail.com Mon Jan 7 22:24:50 2008 From: patroclo7 at 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 at masanjin.net Tue Jan 8 01:36:35 2008 From: wmorgan-sup at 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 at masanjin.net Tue Jan 8 01:36:48 2008 From: wmorgan-sup at 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 at masanjin.net Tue Jan 8 01:39:41 2008 From: wmorgan-sup at 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 at masanjin.net Tue Jan 8 01:37:40 2008 From: wmorgan-sup at 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 at gmail.com Tue Jan 8 06:31:56 2008 From: patroclo7 at 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 at masanjin.net Tue Jan 8 10:34:28 2008 From: wmorgan-sup at 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 at gmail.com Tue Jan 8 11:21:23 2008 From: patroclo7 at 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 at masanjin.net Tue Jan 8 11:40:49 2008 From: wmorgan-sup at 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 at masanjin.net Tue Jan 8 12:23:03 2008 From: wmorgan-sup at 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 at gmail.com Tue Jan 8 12:32:54 2008 From: patroclo7 at 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 at gmail.com Tue Jan 8 13:42:59 2008 From: patroclo7 at 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 at sneakemail.com Tue Jan 8 22:39:18 2008 From: 5srmspw02 at 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 at masanjin.net Wed Jan 9 11:09:48 2008 From: wmorgan-sup at 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 at gmail.com Wed Jan 9 12:49:18 2008 From: patroclo7 at 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 at masanjin.net Wed Jan 9 12:57:31 2008 From: wmorgan-sup at 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 at masanjin.net Wed Jan 9 13:00:53 2008 From: wmorgan-sup at 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 at masanjin.net Wed Jan 9 13:09:12 2008 From: wmorgan-sup at 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 at masanjin.net Wed Jan 9 14:02:47 2008 From: wmorgan-sup at 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 at bar-coded.net Wed Jan 9 16:09:47 2008 From: marcus-sup at 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 at masanjin.net Wed Jan 9 18:02:05 2008 From: wmorgan-sup at 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 at gmail.com Wed Jan 9 19:39:10 2008 From: patroclo7 at 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 at masanjin.net Thu Jan 10 01:34:03 2008 From: wmorgan-sup at 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 at gmail.com Thu Jan 10 02:05:40 2008 From: ingmar.stdin at 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 at bar-coded.net Thu Jan 10 06:37:45 2008 From: marcus-sup at 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 at masanjin.net Thu Jan 10 11:22:03 2008 From: wmorgan-sup at 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 at gmail.com Thu Jan 10 12:23:35 2008 From: ingmar.stdin at 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 at masanjin.net Thu Jan 10 12:45:50 2008 From: wmorgan-sup at 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 at bar-coded.net Fri Jan 11 06:09:12 2008 From: marcus-sup at 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 at bar-coded.net Fri Jan 11 12:20:58 2008 From: marcus-sup at 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 at masanjin.net Sat Jan 12 21:22:58 2008 From: wmorgan-sup at 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 at masanjin.net Sat Jan 12 21:32:20 2008 From: wmorgan-sup at 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 at masanjin.net Sat Jan 12 22:32:04 2008 From: wmorgan-sup at 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 at masanjin.net Sun Jan 13 00:30:16 2008 From: wmorgan-sup at 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 at masanjin.net Sun Jan 13 01:04:16 2008 From: wmorgan-sup at 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 at gmail.com Sun Jan 13 08:09:02 2008 From: patroclo7 at 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 at gmail.com Sun Jan 13 08:10:16 2008 From: patroclo7 at 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 at gmail.com Sun Jan 13 08:22:18 2008 From: patroclo7 at 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 at gmail.com Sun Jan 13 09:46:15 2008 From: nicolas.pouillard at 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 at gmail.com Sun Jan 13 10:57:26 2008 From: nicolas.pouillard at 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 at bar-coded.net Sun Jan 13 13:16:12 2008 From: marcus-sup at 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 at bar-coded.net Sun Jan 13 13:19:46 2008 From: marcus-sup at 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 at masanjin.net Sun Jan 13 19:55:28 2008 From: wmorgan-sup at 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 at masanjin.net Sun Jan 13 19:56:00 2008 From: wmorgan-sup at 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 at masanjin.net Sun Jan 13 20:06:37 2008 From: wmorgan-sup at 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 at masanjin.net Sun Jan 13 20:23:25 2008 From: wmorgan-sup at 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 at masanjin.net Sun Jan 13 21:16:19 2008 From: wmorgan-sup at 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 at masanjin.net Sun Jan 13 21:17:26 2008 From: wmorgan-sup at 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 at gmail.com Mon Jan 14 04:00:38 2008 From: nicolas.pouillard at 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 at gmail.com Mon Jan 14 04:01:58 2008 From: nicolas.pouillard at 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 at bar-coded.net Mon Jan 14 05:54:26 2008 From: marcus-sup at 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 at bar-coded.net Mon Jan 14 07:24:27 2008 From: marcus-sup at 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 at masanjin.net Mon Jan 14 23:49:35 2008 From: wmorgan-sup at 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 at masanjin.net Tue Jan 15 00:05:58 2008 From: wmorgan-sup at 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 at masanjin.net Tue Jan 15 00:20:17 2008 From: wmorgan-sup at 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 at bar-coded.net Tue Jan 15 04:18:28 2008 From: marcus-sup at 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 at bar-coded.net Tue Jan 15 04:40:04 2008 From: marcus-sup at 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 at bar-coded.net Tue Jan 15 07:29:57 2008 From: marcus-sup at 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 at gmail.com Tue Jan 15 07:54:44 2008 From: patroclo7 at 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 at bar-coded.net Tue Jan 15 09:02:27 2008 From: marcus-sup at 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 at antiflux.org Tue Jan 15 11:30:04 2008 From: grant at 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 at antiflux.org Tue Jan 15 11:34:48 2008 From: grant at 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 at masanjin.net Tue Jan 15 20:31:33 2008 From: wmorgan-sup at 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 at masanjin.net Tue Jan 15 20:32:31 2008 From: wmorgan-sup at 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 at masanjin.net Tue Jan 15 20:45:14 2008 From: wmorgan-sup at 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'