sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit 9d3fd0b87ecf252440f0bce40eb20ab17c53b1ac
parent 452b251a1cc98098e7f438005d8f2c0fa1042745
Author: Gaute Hope <eg@gaute.vetsj.com>
Date:   Thu, 24 Oct 2013 11:46:26 +0200

List whether source is usual, notify user of special handling

also list :usual as attr_reader in Source

Diffstat:
M lib/sup.rb | 12 ++++++++++--
M lib/sup/source.rb | 2 +-
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/lib/sup.rb b/lib/sup.rb
@@ -203,13 +203,18 @@ EOS
     sources = SourceManager.sources
     newly_synced = sources.select { |s| s.is_a? Maildir and s.sync_back_enabled? and not active_sync_sources.include? s.uri }
     unless newly_synced.empty?
-      Redwood.warn_syncback <<EOS
+
+      details =<<EOS
 It appears that the option "sync_back" of the following source(s)
 has been changed from false to true since the last execution of
 sup:
 
-#{newly_synced.join("\n")}
 EOS
+      newly_synced.each do |s|
+        details += "#{s} (usual: #{s.usual})\n"
+      end
+
+      Redwood.warn_syncback details
     end
   end
 
@@ -224,6 +229,9 @@ It is *strongly* recommended that you run "sup-sync-back-maildir"
 before continuing, otherwise you might lose informations in your
 Xapian index.
 
+Please note that if you have any sources that are not marked as 'ususal'
+you need to manually specify them to the sup-sync-back-maildir script.
+
 This script should be executed each time the "sync_back_to_maildir" is
 changed from false to true.
 
diff --git a/lib/sup/source.rb b/lib/sup/source.rb
@@ -54,7 +54,7 @@ class Source
   ## Examples for you to look at: mbox.rb and maildir.rb.
 
   bool_accessor :usual, :archived
-  attr_reader :uri
+  attr_reader :uri, :usual
   attr_accessor :id
 
   def initialize uri, usual=true, archived=false, id=nil