[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Gnus temporary group?
Re: Gnus temporary group?
Sun, 21 Sep 2014 10:44:13 +0800
Gnus/5.130012 (Ma Gnus v0.12) Emacs/24.4.50 (gnu/linux)
address@hidden (Tory S. Anderson) writes:
> yeah, that sounds simple enough. I wasn't sure if there is a way of
> defining a persistent "view" of a folder that would allow me to filter
> by a regexp, and then I would just delete the view (without physically
> moving anything).
I think nnir is actually capable of doing all this, there are just some
plumbing functions that would need to be written. I don't know the code
well enough to tell you exactly step by step, but if you're
interested, take a look at nnir.el.
I think the idea would be, you'd register a nnir search engine in
`nnir-engines'. The engine would look like '(class-search
nnir-run-class-search), where the second element is the name of the
function that's responsible for returning a list of "found" message
specifications: each specification is a vector containing the group name
and the article number (and a score).
Since presumably all the relevant messages are in the same group, all
you'd need is a list of the message numbers for relevant messages. You
could get that by writing a short elisp function that you call on
students' messages as they arrive, which writes the article number to a
file, or otherwise stores it. Then your nnir-run-class-search function
reads the numbers from the file, zips them together with the appropriate
group name, and produces the list of vectors.
The problem is, how to invoke the search? It looks to me like nnir
search engines need to be associated with a Gnus backend -- you can't
just run them arbitrarily. I don't know if there's a way to get around
that; I do this in Gnorb, and have to ask users to add a dummy backed to
their gnus-secondary-select-method, as a place to hang the search.
I know this doesn't sound convenient at all! But it's something to keep
in mind, as I think it's the direction the code is headed in.
> Alberto Luaces <address@hidden> writes:
>> On 19 sep 2014, address@hidden wrote:
>>> I have a school class that will be sending me lots of email, which I
>>> want to keep in its own folder. But when the semester is over I will
>>> want to disolve that folder and archive the emails back in my
>>> mail.misc. What's the preferred solution for a case like this?
>> I don't know if it is the "preferred", but moving all the mails back to
>> mail.misc with B-m and then, in the summary buffer, deleting the group
>> with G-DEL should work.