* Re: Gnus temporary group?
2014-09-19 10:44 ` Tory S. Anderson
@ 2014-09-19 16:39 ` Alberto Luaces
2014-09-19 20:49 ` Garreau, Alexandre
2014-09-21 2:44 ` Eric Abrahamsen
2 siblings, 0 replies; 7+ messages in thread
From: Alberto Luaces @ 2014-09-19 16:39 UTC (permalink / raw)
To: help-gnu-emacs
On 19 sep 2014, torys.anderson@gmail.com wrote:
>
>> Alberto Luaces <aluaces@udc.es> writes:
>>
>>> On 19 sep 2014, torys.anderson@gmail.com 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.
>
>
>
> 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).
Maybe you can do the other way around: after you have finished the
semester, make a virtual group that contains that folder and the main
folder, therefore having only one group to check and archive, without
moving anything.
--
Alberto
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Gnus temporary group?
2014-09-19 10:44 ` Tory S. Anderson
2014-09-19 16:39 ` Alberto Luaces
@ 2014-09-19 20:49 ` Garreau, Alexandre
2014-09-21 2:44 ` Eric Abrahamsen
2 siblings, 0 replies; 7+ messages in thread
From: Garreau, Alexandre @ 2014-09-19 20:49 UTC (permalink / raw)
To: Tory S. Anderson; +Cc: help-gnu-emacs, Alberto Luaces
[-- Attachment #1: Type: text/plain, Size: 2083 bytes --]
On 2014-09-19 at 12:44, Tory S. Anderson wrote:
> Alberto Luaces <aluaces@udc.es> writes:
>> On 19 sep 2014, torys.anderson@gmail.com 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.
>
> 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).
You can give to your pupils a “plus” email address like
“torys.anderson+school@gmail.com”, and then do `/ R' and type this
address to limit buffer to these mails, and you’ll see only their
mails. Otherwise you can also do `/ a' and type a regexp which match all
your pupils email address if you can find one (easy if the school is
providing email accounts, but since you’re using a gmail address, I
guess unfortunately it isn’t so :/). Otherwise you can still do `/ s' to
limit according subject…
If none of these is possible, yeah, create a group for it and manually
put mails in, and then put the mails elsewhere when you don’t need this
group anymore, still manually. There’s of course probably already a way
to do it automatically (there always is, at worse you’d have to add some
code to your .emacs.d/gnus.el), but it is (unfortunately) probably
quicker to do this way than to search for an automated way to do it.
Anyway, instead of merging this group in misc at the end of the
semester, you can still just make a folder “school” and begin giving a
“plus” email address, so you can keep mails in this folder for longer,
and there’re still less numerous than in misc.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 948 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Gnus temporary group?
2014-09-19 10:44 ` Tory S. Anderson
2014-09-19 16:39 ` Alberto Luaces
2014-09-19 20:49 ` Garreau, Alexandre
@ 2014-09-21 2:44 ` Eric Abrahamsen
2 siblings, 0 replies; 7+ messages in thread
From: Eric Abrahamsen @ 2014-09-21 2:44 UTC (permalink / raw)
To: help-gnu-emacs
torys.anderson@gmail.com (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.
Eric
> Alberto Luaces <aluaces@udc.es> writes:
>
>> On 19 sep 2014, torys.anderson@gmail.com 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.
^ permalink raw reply [flat|nested] 7+ messages in thread