showing up in future searches, but that's all that Sup does. Spam
filtering should be done by a dedicated tool like SpamAssassin.
+Q: How do I delete a message?
+A: Press the 'd' key.
+
+Q: But I want to delete it for real, not just add a 'deleted' flag in
+ the index. I want it gone from disk!
+A: Deleting a message is an old-fashioned concept. In the modern
+ world, disk space is cheap enough that you should never have to
+ delete a message. If it's spam, save it for future analysis.
+
+Q: C'mon, really!
+A: Ok, at some point I plan to have a batch deletion tool that will
+ run through a source and delete all messages that have a 'spam' or
+ 'deleted' tags (and, for mbox sources, will update the offsets of
+ all later messages). But that doesn't exist yet.
+
Q: What are all these "Redwood" references I see in the code?
A: That was Sup's original name. (Think pine, elm. Although I am a
Mutt user, I couldn't think of a good progression there.) But it was
end
query.add_query Ferret::Search::TermQuery.new("label", "spam"), :must_not unless opts[:load_spam] || labels.include?(:spam)
+ query.add_query Ferret::Search::TermQuery.new("label", "deleted"), :must_not unless opts[:load_deleted] || labels.include?(:deleted)
query.add_query Ferret::Search::TermQuery.new("label", "killed"), :must_not unless opts[:load_killed] || labels.include?(:killed)
query
end
## labels that have special semantics. user will be unable to
## add/remove these via normal label mechanisms.
- RESERVED_LABELS = [ :starred, :spam, :draft, :unread, :killed, :sent ]
+ RESERVED_LABELS = [ :starred, :spam, :draft, :unread, :killed, :sent, :deleted ]
## labels which it nonetheless makes sense to search for by
- LISTABLE_LABELS = [ :starred, :spam, :draft, :sent ]
+ LISTABLE_LABELS = [ :starred, :spam, :draft, :sent, :deleted ]
## labels that will never be displayed to the user
HIDDEN_LABELS = [ :starred, :unread ]
def load_threads opts={}
n = opts[:num] || ThreadIndexMode::LOAD_MORE_THREAD_NUM
load_n_threads_background n, :label => :inbox,
- :load_killed => false,
- :load_spam => false,
:when_done => (lambda do |num|
opts[:when_done].call if opts[:when_done]
BufferManager.flash "Added #{num} threads."
k.add :edit_labels, "Edit or add labels for a thread", 'l'
k.add :edit_message, "Edit message (drafts only)", 'e'
k.add :mark_as_spam, "Mark thread as spam", 'S'
+ k.add :delete, "Mark thread for deletion", 'd'
k.add :kill, "Kill thread (never to be seen in inbox again)", '&'
k.add :save, "Save changes now", '$'
k.add :jump_to_next_new, "Jump to next new thread", :tab
regen_text
end
+ def delete
+ t = @threads[curpos] or return
+ multi_delete [t]
+ end
+
+ def multi_delete threads
+ threads.each do |t|
+ t.toggle_label :deleted
+ hide_thread t
+ end
+ regen_text
+ end
+
def kill
t = @threads[curpos] or return
multi_kill [t]