ensure
Redwood::finish
stop_cursing
-
- # don't ask me why, but sometimes it's necessary to print something
- # to stderr at this point or the exception doesn't get printed.
- # doesn't get printed. WHY?
-
- $stderr.puts " "
+ if $exception
+ Redwood::log "oh crap, an exception"
+ else
+ Redwood::log "good night, sweet prince!"
+ end
end
Index.save unless $exception # TODO: think about this
index.add_source source
end
-say "Saving source list..."
index.save
Redwood::finish
$stderr.puts "Restored state on #{num_restored} (#{100.0 * num_restored / num_scanned}%) messages." if num_restored > 0
end
ensure
- $stderr.puts "Saving index and sources..."
index.save
Redwood::finish
end
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
- blank compose-mode rather than do nothing
_ bugfix: add new message counts until keypress
_ bugfix: attachment filenames sometimes not detected (filename=)
-_ bugfix: final logging messages to stdout?
+x bugfix: final logging messages to stdout?
x 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
+ blank compose-mode rather than do nothing
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
_ undo
_ gmail
_ warnings: top-posting, missing attachment, ruby-talk:XXXX detection
-_ mboxz (compressed mbox)
+_ mboxz, mboxbz
future
------
Redwood::LabelManager.save
Redwood::ContactManager.save
Redwood::PersonManager.save
+ Redwood::BufferManager.deinstantiate!
end
## not really a good place for this, so I'll just dump it here.
end
def save
+ Redwood::log "saving index and sources..."
FileUtils.mkdir_p @dir unless File.exists? @dir
save_sources
save_index
# $stderr.puts s
make_buf
@mode << "#{Time.now}: #{s.chomp}\n"
- $stderr.puts "[#{Time.now}] #{s.chomp}" unless @mode.buffer
+ $stderr.puts "[#{Time.now}] #{s.chomp}" unless BufferManager.instantiated? && @mode.buffer
end
def self.method_missing m, *a
## allows for constructors that take arguments.
##
## You must have #initialize call "self.class.i_am_the_instance self"
-## at some point or everything will fail horribly
+## at some point or everything will fail horribly.
module Singleton
module ClassMethods
def instance; @instance; end
def instantiated?; defined?(@instance) && !@instance.nil?; end
+ def deinstantiate!; @instance = nil; end
def method_missing meth, *a, &b
raise "no instance defined!" unless defined? @instance
@instance.send meth, *a, &b