Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Eric Sherman <hyperbolist@gmail.com>
To: sup-devel <sup-devel@rubyforge.org>
Subject: [sup-devel] [PATCH] show (recipients) instead of lone "me"
Date: Thu, 21 Jan 2010 10:36:28 -0500	[thread overview]
Message-ID: <1264087996-sup-5125@changeling.local> (raw)

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


             reply	other threads:[~2010-01-21 15:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-21 15:36 Eric Sherman [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1264087996-sup-5125@changeling.local \
    --to=hyperbolist@gmail.com \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox