-== 0.0.7 / XXXXXX
-* Moving messages between sources now preserves state.
+== 0.0.7 / 2007-02-12
* Split sup-import into two bits: sup-import and sup-add.
* Command-line arguments now handled by trollop.
* Better error handling for IMAP and svn+ssh.
-* New commands in thread-view-mode
+* Messages can now be moved between sources while preserving all
+ message state.
+* New commands in thread-view-mode:
- 'a' to add an email to the addressbook
- 'S' to search for all email to/from an email address
- 'A' to kill buffer and archive thread in one swell foop
-for 0.0.7
-----------------
-de-archived messages should be auto-added to inbox
-
for 0.0.8
---------
message attachments
pop
be able to mark individual messages as spam in thread-view-mode
toggle wrapping
+maybe: de-archived messages auto-added to inbox
done
----
end
module Redwood
- VERSION = "0.0.6"
+ VERSION = "0.0.7"
BASE_DIR = ENV["SUP_BASE"] || File.join(ENV["HOME"], ".sup")
CONFIG_FN = File.join(BASE_DIR, "config.yaml")
hide_thread t if contains_thread? t
end
- def handle_unarchived_update sender, t
- ## XXX todo: fill me in
- end
+# not quite working, and not sure if i like it anyways
+# def handle_unarchived_update sender, t
+# Redwood::log "unarchived #{t.subj}"
+# show_thread t
+# end
def status
super + " #{Index.size} messages in index"
end
def handle_starred_update sender, m
- return unless(t = @ts.thread_for m)
- update_text_for_line @lines[t]
+ t = @ts.thread_for(m) or return
+ l = @lines[t] or return
+ update_text_for_line l
BufferManager.draw_screen
end
def handle_read_update sender, t
- return unless @lines[t]
+ l = @lines[t] or return
update_text_for_line @lines[t]
BufferManager.draw_screen
end
- def handle_archived_update *a; handle_read_update *a; end
+ def handle_archived_update *a; handle_read_update(*a); end
## overwrite me!
def is_relevant? m; false; end
def actually_toggle_archived t
if t.has_label? :inbox
t.remove_label :inbox
- UpdateManager.relay self, :unarchived, t
- else
- t.add_label :inbox
UpdateManager.relay self, :archived, t
+ else
+ t.apply_label :inbox
+ UpdateManager.relay self, :unarchived, t
end
end
@tags.drop_tag_for t
end
+ def show_thread t
+ if @hidden_threads[t]
+ @hidden_threads.delete t
+ else
+ @ts.add_thread t
+ end
+ update
+ end
+
def update_text_for_line l
return unless l # not sure why this happens, but it does, occasionally
@text[l] = text_for_thread @threads[l]
end
end
+ ## merges in a pre-loaded thread
+ def add_thread t
+ raise "duplicate" if @subj_thread.values.member? t
+ t.each { |m, *o| add_message m }
+ end
+
def is_relevant? m
m.refs.any? { |ref_id| @messages[ref_id] }
end