sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 266ad46af0e0139c46337e31fc120ab530df3eb9
parent a8f066da110aef455b7ad6c5e533607090994321
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Sun,  1 Apr 2007 05:25:37 +0000

better broken source error message, and fixed compose from thread-view-mode bug

git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@356 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M History.txt | 3 ++-
M doc/TODO | 11 +++++++----
M lib/sup.rb | 15 +++++++++------
M lib/sup/modes/thread-view-mode.rb | 11 ++++++++---
4 files changed, 26 insertions(+), 14 deletions(-)
diff --git a/History.txt b/History.txt
@@ -1,5 +1,6 @@
 == 0.0.8 / XXXX
-* Maildir support.
+* Maildir support!
+* Be proactive about notifying users of de-synced sources.
 * Renamed sup-import => sup-sync with a brand new interface.
 * Added a sup-dump, to enable backing up and rebuilding indices from
   scratch (e.g. when Ferret upgrades break index formats).
diff --git a/doc/TODO b/doc/TODO
@@ -1,18 +1,16 @@
 for 0.0.8
 ---------
-_ split out threading & message chunk parsing to a separate library
 _ nice little startup config program
 _ bugfix: when one new message comes into an imap folder, we don't
    catch it until a reload
 _ bugfix: triggering a pageup when cursor scrolling up jumps to the
    bottom of the page rather than the next line
-_ bugfix: m in thread-view-mode when a person is not selected should open up a
   blank compose-mode rather than do nothing
-_ Net::SMTP support (cuz I'm going to need it soon)
 _ bugfix: add new message counts until keypress
 _ bugfix: attachment filenames sometimes not detected (filename=)
 _ bugfix: final logging messages to stdout?
 _ bugfix: mbox directory shouldn't generate an exception, just an error
+x bugfix: m in thread-view-mode when a person is not selected should open up a
 x bugfix: stars on messages with blue backgrounds still have green bgs
 x ferret upgrade script (dump & restore)
 x bugfix: mark messages as read immediately when t-v-m is opened
@@ -22,8 +20,13 @@ x bugfix: detect source corruption at startup
 x maildir
 x bugfix: single-line messages come empty upon reply
 
-for 0.0.9
+next release
+------------
+_ split out threading & message chunk parsing to a separate library
+
+near future
 ---------
+_ Net::SMTP support (cuz I'm going to need it soon)
 _ create attachments
 _ forward attachments
 _ select all, starred, to me, etc
diff --git a/lib/sup.rb b/lib/sup.rb
@@ -100,13 +100,16 @@ module Redwood
     return unless BufferManager.instantiated?
     broken_sources = Index.usual_sources.select { |s| s.broken? }
     unless broken_sources.empty?
-      BufferManager.spawn "Broken source report", TextMode.new(<<EOM)
-Broken source report
---------------------
+      BufferManager.spawn "Out-of-sync soure notification", TextMode.new(<<EOM)
+Out-of-sync source notification
+-------------------------------
 
-The following message sources reported errors. Until these errors are
-corrected, messages from these sources cannot be viewed, and new messages
-will not be detected.
+Hi there. It looks like one or more sources have fallen out of sync
+with my index. This can happen when you modify these sources with
+other email clients. (Sorry, I don't play well with others.)
+
+Until this is corrected, messages from these sources cannot be viewed,
+and new messages will not be detected. Luckily, this is easy to correct!
 
 #{broken_sources.map { |s| "Source: " + s.to_s + "\n Error: " + s.broken_msg.wrap(70).join("\n        ") }.join('\n\n')}
 EOM
diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
@@ -119,9 +119,14 @@ class ThreadViewMode < LineCursorMode
   end    
 
   def compose
-    p = @person_lines[curpos] or return
-    mode = ComposeMode.new :to => [p]
-    BufferManager.spawn "Message to #{p.name}", mode
+    p = @person_lines[curpos]
+    mode =
+      if p
+        ComposeMode.new :to => [p]
+      else
+        ComposeMode.new
+      end
+    BufferManager.spawn "Compose message", mode
     mode.edit
   end