Subject: [sup-talk] Can sup only "save threads" on exit??

From: [email-masked] (Steve Goldman)
Date: Tue, 04 Nov 2008 17:55:57 -0500

When I quit, sup goes through a slow process where it "saves" all the
modified threads.  This is problematic because 1) it takes a long
time, and 2) if sup crashes before I get a chance to exit, then I have
to rearchive everything again.

Thanks.
-- 

Steve Goldman
sgoldman at tower-research.com

T: 212.219.6014
F: 212.219.6007

Tower Research Capital, LLC
377 Broadway, 11th Fl.
New York, NY 10013

---

From: [email-masked] (John Bent)
Date: Tue, 04 Nov 2008 17:36:00 -0700

> to rearchive everything again.
Do a 'H' and look at the help.  '$' does save now.

John

---

From: [email-masked] (Nicolas Pouillard)
Date: Wed, 05 Nov 2008 14:06:46 +0100

> Do a 'H' and look at the help.  '$' does save now.

The help is '?' actually.

-- 
Nicolas Pouillard aka Ertai

---

From: [email-masked] (Steve Goldman)
Date: Wed, 05 Nov 2008 09:34:42 -0500

> Do a 'H' and look at the help.  '$' does save now.

Great.  Is there a setting to make sup do this automatically every
once in a while?  It would be nice to be able to leave sup open all
day, or many days, and not have to worry about remembering to hit '$'
or a crash.

Thanks.
-- 

Steve Goldman

T: 212.219.6014
F: 212.219.6007

---

From: [email-masked] (William Morgan)
Date: Wed, 05 Nov 2008 09:59:18 -0800

> day, or many days, and not have to worry about remembering to hit '$'

There is not. Patches accepted!
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Steve Goldman)
Date: Thu, 06 Nov 2008 09:38:44 -0500

> There is not. Patches accepted!

Point me to a beginning ruby tutorial!  I've never contributed to
anything open source before.  So exciting.
-- 

Steve Goldman

T: 212.219.6014
F: 212.219.6007

---

From: [email-masked] (Nicolas Pouillard)
Date: Thu, 06 Nov 2008 15:40:52 +0100

> day, or many days, and not have to worry about remembering to hit '$'

I have this in my ~/.sup/hooks/before-poll.rb:
  say "Saving threads"
  InboxMode.instance.save

However saving from time to time would be nice also.
Moreover saving the contacts.txt file on '$' would be also nice.

---

From: [email-masked] (Nicolas Pouillard)
Date: Thu, 6 Nov 2008 16:00:02 +0100

---
 lib/sup/modes/thread-index-mode.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
index 4de4613..3dd0498 100644
--- a/lib/sup/modes/thread-index-mode.rb
+++ b/lib/sup/modes/thread-index-mode.rb
@@ -386,6 +386,7 @@ EOS
   end
 
   def save
+    BufferManager.say("Saving contacts...") { ContactManager.instance.save }
     dirty_threads = @mutex.synchronize { (@threads + @hidden_threads.keys).select { |t| t.dirty? } }
     return if dirty_threads.empty?
 
-- 
1.5.5.rc3

---

From: [email-masked] (William Morgan)
Date: Thu, 06 Nov 2008 08:18:46 -0800

> anything open source before.  So exciting.

There are a couple Ruby for beginners tutorials:
- http://pine.fm/LearnToProgram/?Chapter=01,
- http://poignantguide.net/ruby/ (best read while high),
- http://tryruby.hobix.com/

But you might be better of with Ruby for Java programmers stuff:
- http://onestepback.org/articles/10things/
- http://www.jroller.com/obie/entry/ruby_primer_for_java_programmers

etc.

You'll also have to know git to contribute to Sup. See
http://sup.rubyforge.org/wiki/wiki.pl?Contributing.
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (William Morgan)
Date: Thu, 06 Nov 2008 08:19:37 -0800

> The help is '?' actually.

'H' is help everywhere except thread-view-mode, where it's overridden
to view headers. Maybe it shouldn't be.
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (William Morgan)
Date: Thu, 06 Nov 2008 14:35:13 -0800

Reformatted excerpts from Steve Goldman's message of 2008-11-05:
> Is there a setting to make sup do this automatically every

I've been avoiding this because currently the only way to undo changes
in thread-index-mode is to press @, which reverts you to the state you
were last time you pressed $. Undo patches also welcome. :)
-- 
William <wmorgan-sup at masanjin.net>

---

From: [email-masked] (Nicolas Pouillard)
Date: Fri, 07 Nov 2008 15:18:16 +0100

> to view headers. Maybe it shouldn't be.

I often use 'H' for headers, it's pretty natural. I think the '?' binding is
sufficient for help and that the 'H' alias could be removed.

Moreover to help newcomers having a little text in the bottom bar like "type
'?' for help" would be nice.

---

From: [email-masked] (Mike Stipicevic)
Date: Fri, 07 Nov 2008 12:13:48 -0500

I had hoped to work on this in a bit...

-- 
Mike Stipicevic
Chairman, RPI Student Branch of the IEEE

stipim at rpi.edu
mstipicevic at ieee.org

---

From: [email-masked] (William Morgan)
Date: Sun, 09 Nov 2008 20:49:41 -0800

Reformatted excerpts from nicolas.pouillard's message of 2008-11-07:
> I often use 'H' for headers, it's pretty natural. I think the '?'
> binding is sufficient for help and that the 'H' alias could be
> removed.
> 
> Moreover to help newcomers having a little text in the bottom bar like
> "type '?' for help" would be nice.

Your wish is my command!

---

From: [email-masked] (William Morgan)
Date: Sun, 09 Nov 2008 20:51:23 -0800

Applied, thanks!