Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] [PATCH] show (recipients) instead of lone "me"
@ 2010-01-21 15:36 Eric Sherman
  2010-01-21 21:34 ` Tero Tilus
  2010-02-27  7:54 ` Rich Lane
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Sherman @ 2010-01-21 15:36 UTC (permalink / raw)
  To: sup-devel

I've changed thread-index-mode to show recipients in () parens instead
of "me" in the From field for threads from me with no replies.

I've developed the habit of archiving a new thread as soon as I send it,
so until I receive a reply it's effectively non-existent.  When checking
on emails I may want to follow up on with a search like "is:sent AND
after:(14 days ago) AND before:(3 days ago)" I would get a pile of lone
"me"'s in the From field.  I would then open each of them to decide
whether or not to follow up based on who it was sent to.

So this helps me cut down on the j<CR>x loops in that scenario.

I'm not sure if this is something that is universally desirable, but
here's the patch anyway.
---
 lib/sup/modes/thread-index-mode.rb |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
index a6bb2b9..0774aa8 100644
--- a/lib/sup/modes/thread-index-mode.rb
+++ b/lib/sup/modes/thread-index-mode.rb
@@ -793,6 +793,16 @@ protected
       result << [name, new[a]]
     end
 
+    if result.size == 1 && (author_and_newness = result.assoc("me"))
+      unless (recipients = t.participants - t.authors).empty?
+        result = recipients.collect do |r|
+          break if limit && result.size >= limit
+          name = (recipients.size == 1) ? r.mediumname : r.shortname
+          ["(#{name})", author_and_newness[1]]
+        end
+      end
+    end
+
     result
   end
 
-- 
1.6.6

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-03-01 14:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-21 15:36 [sup-devel] [PATCH] show (recipients) instead of lone "me" Eric Sherman
2010-01-21 21:34 ` Tero Tilus
2010-01-21 23:56   ` Ben Walton
2010-03-01 14:58     ` William Morgan
2010-02-27  7:54 ` Rich Lane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox