Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Move message of a given year into new group
@ 2013-04-08 12:53 Rainer M. Krug
  2013-04-08 20:08 ` Adam Sjøgren
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Rainer M. Krug @ 2013-04-08 12:53 UTC (permalink / raw)
  To: info-gnus-english


[-- Attachment #1.1: Type: text/plain, Size: 1029 bytes --]

Hi

I am getting my gmail - offlineimap - gnus up and running and I am quite
happy with it. I just would like to move some email from my "[gmail]/All
Mail" into an Archive group to move some message from gmail to make
offlineimap faster. 

So I would like to move all mails before 2011 into groups Archive.YEAR,
where YEAR is the year of the email. 

I thought this is a case for splitting, but I didn't find anything to
split according to date. Furthermore, as this sorting would be done
once, spliting might not be the best approach. 

Any suggestions how I could achieve this Archiving?

Thanks,

Rainer
 

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

[-- Attachment #1.2: Type: application/pgp-signature, Size: 489 bytes --]

[-- Attachment #2: Type: text/plain, Size: 162 bytes --]

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Move message of a given year into new group
  2013-04-08 12:53 Move message of a given year into new group Rainer M. Krug
@ 2013-04-08 20:08 ` Adam Sjøgren
  2013-04-09  7:34   ` Rainer M. Krug
  2013-04-09 14:26 ` Memnon Anon
  2013-04-10  8:45 ` Memnon Anon
  2 siblings, 1 reply; 8+ messages in thread
From: Adam Sjøgren @ 2013-04-08 20:08 UTC (permalink / raw)
  To: info-gnus-english

Rainer@krugs.de (Rainer M. Krug) writes:

> So I would like to move all mails before 2011 into groups Archive.YEAR,
> where YEAR is the year of the email. 

Maybe you can use the limiting functions to get to this?

,----
| / t runs the command gnus-summary-limit-to-age, which is an
| interactive compiled Lisp function in `gnus-sum.el'.
| 
| It is bound to / t, <menu-bar> <Gnus> <Limit to> <Age...>.
| 
| (gnus-summary-limit-to-age AGE &optional YOUNGER-P)
| 
| Limit the summary buffer to articles that are older than (or equal) AGE days.
| If YOUNGER-P (the prefix) is non-nil, limit the summary buffer to
| articles that are younger than AGE days.
`----

I would have thought that something something like / x Date 2011 RET
would be possible, but it doesn't seem to work for me (even though I
have Date in gnus-extra-headers); I don't know why.

If this is a one-off thing, of course.


  Best regards,

    Adam

-- 
 "God must've been punting angels left and right."            Adam Sjøgren
                                                         asjo@koldfront.dk

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

* Re: Move message of a given year into new group
  2013-04-08 20:08 ` Adam Sjøgren
@ 2013-04-09  7:34   ` Rainer M. Krug
  0 siblings, 0 replies; 8+ messages in thread
From: Rainer M. Krug @ 2013-04-09  7:34 UTC (permalink / raw)
  To: Adam Sjøgren; +Cc: info-gnus-english

asjo@koldfront.dk (Adam Sjøgren) writes:

> Rainer@krugs.de (Rainer M. Krug) writes:
>
>> So I would like to move all mails before 2011 into groups Archive.YEAR,
>> where YEAR is the year of the email. 
>
> Maybe you can use the limiting functions to get to this?
>
> ,----
> | / t runs the command gnus-summary-limit-to-age, which is an
> | interactive compiled Lisp function in `gnus-sum.el'.
> | 
> | It is bound to / t, <menu-bar> <Gnus> <Limit to> <Age...>.
> | 
> | (gnus-summary-limit-to-age AGE &optional YOUNGER-P)
> | 
> | Limit the summary buffer to articles that are older than (or equal) AGE days.
> | If YOUNGER-P (the prefix) is non-nil, limit the summary buffer to
> | articles that are younger than AGE days.
> `----

Thanks.
Sounds interesting - I'll look at it. As a once of definitely an option.

>
> I would have thought that something something like / x Date 2011 RET
> would be possible, but it doesn't seem to work for me (even though I
> have Date in gnus-extra-headers); I don't know why.
>
> If this is a one-off thing, of course.

On the one hand, yes - but I was also thinking of splitting 
1) all emais in the "All Mail" folder older then e.g. 2 years and
2) sort these into folders corresponding to the year (i.e. Archive.2010,
Archive.2011, ...)

This would be continuous, as always the emails older then 2 years should
be sorted.

Cheers,

Rainer

>
>
>   Best regards,
>
>     Adam
<#secure method=pgpmime mode=sign>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english

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

* Re: Move message of a given year into new group
  2013-04-08 12:53 Move message of a given year into new group Rainer M. Krug
  2013-04-08 20:08 ` Adam Sjøgren
@ 2013-04-09 14:26 ` Memnon Anon
  2013-04-09 20:59   ` Julien Cubizolles
  2013-04-10  8:45 ` Memnon Anon
  2 siblings, 1 reply; 8+ messages in thread
From: Memnon Anon @ 2013-04-09 14:26 UTC (permalink / raw)
  To: info-gnus-english

Rainer@krugs.de (Rainer M. Krug) writes:

> So I would like to move all mails before 2011 into groups Archive.YEAR,
> where YEAR is the year of the email. 

Would this work:

1. In your mailbox: `/ o'
   (gnus-summary-insert-old-articles &optional ALL)
2. `/ h'
   (gnus-summary-limit-to-headers MATCH &optional REVERSE)
3. For e.g. 2009, use "date:.*2009"
4. `M P b' (gnus-uu-mark-buffer)
5. `B m' 
   (gnus-summary-move-article &optional N TO-NEWSGROUP SELECT-METHOD
   ACTION)

?

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

* Re: Move message of a given year into new group
  2013-04-09 14:26 ` Memnon Anon
@ 2013-04-09 20:59   ` Julien Cubizolles
  0 siblings, 0 replies; 8+ messages in thread
From: Julien Cubizolles @ 2013-04-09 20:59 UTC (permalink / raw)
  To: info-gnus-english

Memnon Anon <gegendosenfleisch@googlemail.com> writes:

> Rainer@krugs.de (Rainer M. Krug) writes:

> 2. `/ h'
>    (gnus-summary-limit-to-headers MATCH &optional REVERSE)
> 3. For e.g. 2009, use "date:.*2009"

I tried with Date:.*2009.* and it works.

Julien.

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

* Re: Move message of a given year into new group
  2013-04-08 12:53 Move message of a given year into new group Rainer M. Krug
  2013-04-08 20:08 ` Adam Sjøgren
  2013-04-09 14:26 ` Memnon Anon
@ 2013-04-10  8:45 ` Memnon Anon
  2013-04-10 10:28   ` Rainer M. Krug
  2 siblings, 1 reply; 8+ messages in thread
From: Memnon Anon @ 2013-04-10  8:45 UTC (permalink / raw)
  To: info-gnus-english

Rainer@krugs.de (Rainer M. Krug) writes:

> So I would like to move all mails before 2011 into groups Archive.YEAR,
> where YEAR is the year of the email. 

BTW, if you want to set on this method from now on, I found this while
browsing the manual:

,----[ (info "(gnus)Expiring Mail") ]
|       (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
|             nnmail-fancy-expiry-targets
|             '((to-from "boss" "nnfolder:Work")
|               ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
|               ("from" ".*" "nnfolder:Archive-%Y")))
| 
|    With this setup, any mail that has `IMPORTANT' in its Subject header
| and was sent in the year `YYYY' and month `MMM', will get expired to
| the group `nnfolder:IMPORTANT.YYYY.MMM'.  If its From or To header
| contains the string `boss', it will get expired to `nnfolder:Work'.
`----

I never tried it, but fancy expiring may be worth investigating...

hth
Memnon

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

* Re: Move message of a given year into new group
  2013-04-10  8:45 ` Memnon Anon
@ 2013-04-10 10:28   ` Rainer M. Krug
  2013-04-10 11:06     ` Rainer M. Krug
  0 siblings, 1 reply; 8+ messages in thread
From: Rainer M. Krug @ 2013-04-10 10:28 UTC (permalink / raw)
  To: Memnon Anon; +Cc: info-gnus-english

Memnon Anon <gegendosenfleisch@googlemail.com> writes:

> Rainer@krugs.de (Rainer M. Krug) writes:
>
>> So I would like to move all mails before 2011 into groups Archive.YEAR,
>> where YEAR is the year of the email. 
>
> BTW, if you want to set on this method from now on, I found this while
> browsing the manual:
>
> ,----[ (info "(gnus)Expiring Mail") ]
> |       (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
> |             nnmail-fancy-expiry-targets
> |             '((to-from "boss" "nnfolder:Work")
> |               ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
> |               ("from" ".*" "nnfolder:Archive-%Y")))
> | 
> |    With this setup, any mail that has `IMPORTANT' in its Subject header
> | and was sent in the year `YYYY' and month `MMM', will get expired to
> | the group `nnfolder:IMPORTANT.YYYY.MMM'.  If its From or To header
> | contains the string `boss', it will get expired to `nnfolder:Work'.
> `----
>
> I never tried it, but fancy expiring may be worth investigating...

Absolutely - and this looks exactly like what I would need. I would then
have to change my habit of Expiring=deleting (moving to [Gmail]\Bin
folder) to Expiring=Archiving - which makes much more sense anyway as E
is pressed easily. Deleting I could then with B m

Thanks a lot - I will investigate,

Rainer


>
> hth
> Memnon
>
>
> _______________________________________________
> info-gnus-english mailing list
> info-gnus-english@gnu.org
> https://lists.gnu.org/mailman/listinfo/info-gnus-english
<#secure method=pgpmime mode=sign>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

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

* Re: Move message of a given year into new group
  2013-04-10 10:28   ` Rainer M. Krug
@ 2013-04-10 11:06     ` Rainer M. Krug
  0 siblings, 0 replies; 8+ messages in thread
From: Rainer M. Krug @ 2013-04-10 11:06 UTC (permalink / raw)
  To: Memnon Anon; +Cc: info-gnus-english

Rainer@krugs.de (Rainer M. Krug) writes:

> Memnon Anon <gegendosenfleisch@googlemail.com> writes:
>
>> Rainer@krugs.de (Rainer M. Krug) writes:
>>
>>> So I would like to move all mails before 2011 into groups Archive.YEAR,
>>> where YEAR is the year of the email. 
>>
>> BTW, if you want to set on this method from now on, I found this while
>> browsing the manual:
>>
>> ,----[ (info "(gnus)Expiring Mail") ]
>> |       (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
>> |             nnmail-fancy-expiry-targets
>> |             '((to-from "boss" "nnfolder:Work")
>> |               ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
>> |               ("from" ".*" "nnfolder:Archive-%Y")))
>> | 
>> |    With this setup, any mail that has `IMPORTANT' in its Subject header
>> | and was sent in the year `YYYY' and month `MMM', will get expired to
>> | the group `nnfolder:IMPORTANT.YYYY.MMM'.  If its From or To header
>> | contains the string `boss', it will get expired to `nnfolder:Work'.
>> `----
>>
>> I never tried it, but fancy expiring may be worth investigating...
>
> Absolutely - and this looks exactly like what I would need. I would then
> have to change my habit of Expiring=deleting (moving to [Gmail]\Bin
> folder) to Expiring=Archiving - which makes much more sense anyway as E
> is pressed easily. Deleting I could then with B m


Just realized the one problem: in gmail, to delete an email from the
account, I have to move it into the Bin directory - so I would have to
do two things:

1) expire it with the fancy target, which works nicely by the way, and 
2) copy it into the bin folder

Other option: I think that when I move it out of the All Mail folder, it
will be removed. So I would have to set expiry targets depending on
the folder from which I want to expire it. Is it from the group
[Gmail]\All Mail I want to expire it to the archive folder
nnimap+Maildir:Archives.%Y but from any other group, I want to expire it
to the [Gmail]\All Mail group. Is this possible? I don't see any
indication in the manual on how I can use nnmail-fancy-expiry-targets
based on groups?

Thanks,

Rainer


>
> Thanks a lot - I will investigate,
>
> Rainer
>
>
>>
>> hth
>> Memnon
>>
>>
>> _______________________________________________
>> info-gnus-english mailing list
>> info-gnus-english@gnu.org
>> https://lists.gnu.org/mailman/listinfo/info-gnus-english
> <#secure method=pgpmime mode=sign>
>
<#secure method=pgpmime mode=sign>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

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

end of thread, other threads:[~2013-04-10 11:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-08 12:53 Move message of a given year into new group Rainer M. Krug
2013-04-08 20:08 ` Adam Sjøgren
2013-04-09  7:34   ` Rainer M. Krug
2013-04-09 14:26 ` Memnon Anon
2013-04-09 20:59   ` Julien Cubizolles
2013-04-10  8:45 ` Memnon Anon
2013-04-10 10:28   ` Rainer M. Krug
2013-04-10 11:06     ` Rainer M. Krug

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).