info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gathering certain emails from across groups in one; labels


From: Adam Sjøgren
Subject: Gathering certain emails from across groups in one; labels
Date: Sun, 26 Sep 2004 15:44:52 +0200
User-agent: Gnus/5.110003 (No Gnus v0.3) XEmacs/21.4 (Security Through Obscurity, linux)

  Hi.


A colleague of mine keeps talking about how nice it would be, if he
could gather all emails about something across the email-groups he
has.

I usually split my email in groups by sender, but when a topic of
conversation has a group of people contributing, it becomes hard to
come back and get an overview of the entire conversation (I'm not
talking about a single thread, it may be a whole bunch of emails in
different threads about a certain topic).

I still want to be able to locate emails by the normal groups I split
to though - the topic of conversations thing is just an extra
tool/view I'd like to have. A dimension more, if you please.

If I could label email and have a special group display all the emails
with a given label, the problem would be solved.


What pieces of the puzzle do I have?

First, I need to label the emails that belong to a topic. Ahh, I can
just edit the emails and add a Keywords:-header¹.

Then I need to gather those emails in one group somehow. Hmm,
nnvirtual gathers all emails from groups whose names match a regexp. 
Oh, and with limiting I can see a subset of those!


So, this is what I do:

Edit emails, adding Keywords: [topic]-headers.

In .gnus I add:

 (add-to-list 'nnmail-extra-headers 'Keywords)

Then I run 'nnml-generate-nov-databases' to get the Keywords added to
the overviews.

With "G V" I create an nnvirtual-group, that I name after the topic I
want it to gather. With M-e I give the virtual-group a regexp that
matches my nnml and nnfolder-groups.

Now, for the limiting I've tried to make a hook² to be added to
'gnus-summary-prepared-hook' that does the equivalent of "/ x Keywords
[topic]" when entering an nnvirtual-group:

 (defun asjo-limit-to-keyword ()
   "Limit to a given keyword in the summary buffer -  in nnvirtual-groups"
   (let
       ((mylist (split-string gnus-newsgroup-name ":")))
     (let
        ((grouptype (car mylist))
         (groupname (car (cdr mylist))))
       (if (string-equal grouptype "nnvirtual")
           (gnus-summary-limit-to-extra 'Keywords groupname)))))

And... it works - quite slow, but it does work!


But, and that's why I'm posting, I'm thinking that the way I do the
virtual-group and limiting could be done in a better way.

The virtual-group ends up having thousands of messages in it and when
I enter it a laaarge summary is build, only to be limited to a very
small subset. It would be better if I could do the limiting
"earlier"...


Any suggestions for improvements/other ways to achieve the same
end-result?


  Best regards,

    Adam


¹ It would be nice if all email in a thread automatically got the
  label if one of them had a Keywords:-header, but I don't know how easy
  that would be to do.
  Oh, does all email-backends support editing?

² Comments on the elisp are very welcome as well, I'm still fumbling
  in the dark.

-- 
 "This is either madness... or brilliance."                   Adam Sjøgren
 "It's remarkable how often those two traits coincide."  asjo@koldfront.dk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]