Gnus development mailing list
 help / color / mirror / Atom feed
* filtering mail from a group
@ 2012-04-28  8:43 Erik Colson
  2012-04-28 11:56 ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Erik Colson @ 2012-04-28  8:43 UTC (permalink / raw)
  To: ding

Hi,

How can I create some kind of search-group which would show only
articles from a specific group which were posted after a specific date ?

thanks
--
erik



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

* Re: filtering mail from a group
  2012-04-28  8:43 filtering mail from a group Erik Colson
@ 2012-04-28 11:56 ` Andreas Schwab
  2012-04-28 15:12   ` Erik Colson
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Schwab @ 2012-04-28 11:56 UTC (permalink / raw)
  To: Erik Colson; +Cc: ding

Erik Colson <eco@ecocode.net> writes:

> How can I create some kind of search-group which would show only
> articles from a specific group which were posted after a specific date ?

You can use / t (gnus-summary-limit-to-age).

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: filtering mail from a group
  2012-04-28 11:56 ` Andreas Schwab
@ 2012-04-28 15:12   ` Erik Colson
  2012-04-30  0:44     ` Sergio Martínez
  0 siblings, 1 reply; 6+ messages in thread
From: Erik Colson @ 2012-04-28 15:12 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: ding

Andreas Schwab <schwab@linux-m68k.org> writes:

> Erik Colson <eco@ecocode.net> writes:
>
>> How can I create some kind of search-group which would show only
>> articles from a specific group which were posted after a specific date ?
>
> You can use / t (gnus-summary-limit-to-age).

Thanks for your answer. This is certainly an option, but I'd like to
have some kind of 'virtual group' which would only show those messages
satisfying the filter...

If not possible I'd go with / t

Thanks
--
erik



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

* Re: filtering mail from a group
  2012-04-28 15:12   ` Erik Colson
@ 2012-04-30  0:44     ` Sergio Martínez
  2012-04-30  9:12       ` Erik Colson
  0 siblings, 1 reply; 6+ messages in thread
From: Sergio Martínez @ 2012-04-30  0:44 UTC (permalink / raw)
  To: Erik Colson; +Cc: ding

Erik Colson <eco@ecocode.net> writes:

S> Andreas Schwab <schwab@linux-m68k.org> writes:
>
>> Erik Colson <eco@ecocode.net> writes:
>>
>>> How can I create some kind of search-group which would show only
>>> articles from a specific group which were posted after a specific date ?
>>
>> You can use / t (gnus-summary-limit-to-age).
>
> Thanks for your answer. This is certainly an option, but I'd like to
> have some kind of 'virtual group' which would only show those messages
> satisfying the filter...
>
> If not possible I'd go with / t
>
> Thanks
> --
> erik

Hi Erik.

Well, Gnus have virtual groups but these are a collection of other
groups (normally small groups). Maybe what you want is what is called
*Splitting mail* in Gnus. I recommend you to read the section *Splitting
Mail* and related sections from the Gnus Manual. If you don't understand
something or have troubles, I can try to help you.



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

* Re: filtering mail from a group
  2012-04-30  0:44     ` Sergio Martínez
@ 2012-04-30  9:12       ` Erik Colson
  2012-05-01  4:05         ` Sergio Martínez
  0 siblings, 1 reply; 6+ messages in thread
From: Erik Colson @ 2012-04-30  9:12 UTC (permalink / raw)
  To: Sergio Martínez; +Cc: Gnus

Sergio Martínez <samf0xb58@gmail.com> writes:

> Erik Colson <eco@ecocode.net> writes:
>
> S> Andreas Schwab <schwab@linux-m68k.org> writes:
>>
>>> Erik Colson <eco@ecocode.net> writes:
>>>
>>>> How can I create some kind of search-group which would show only
>>>> articles from a specific group which were posted after a specific date ?
>>>
>>> You can use / t (gnus-summary-limit-to-age).
>>
>> Thanks for your answer. This is certainly an option, but I'd like to
>> have some kind of 'virtual group' which would only show those messages
>> satisfying the filter...
>>
>> If not possible I'd go with / t
>>
>> Thanks
>> --
>> erik
>
> Hi Erik.
>
> Well, Gnus have virtual groups but these are a collection of other
> groups (normally small groups). Maybe what you want is what is called
> *Splitting mail* in Gnus. I recommend you to read the section *Splitting
> Mail* and related sections from the Gnus Manual. If you don't understand
> something or have troubles, I can try to help you.

Hi Sergio!

Thanks for your answer!
I don't want to put mails in another mailbox. I want to limit the mails
to mails posted after a certain date, without removing the older ones
from the mailbox. It is doable with / t but that makes me calculate
again and again the number of days since the 'filter date'. Because / t
requires to enter a number of days and not a date...

Thanks for helping !
--
erik



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

* Re: filtering mail from a group
  2012-04-30  9:12       ` Erik Colson
@ 2012-05-01  4:05         ` Sergio Martínez
  0 siblings, 0 replies; 6+ messages in thread
From: Sergio Martínez @ 2012-05-01  4:05 UTC (permalink / raw)
  To: Erik Colson; +Cc: Gnus

Erik Colson <eco@ecocode.net> writes:
>
> Hi Sergio!
>
> Thanks for your answer!
> I don't want to put mails in another mailbox. I want to limit the mails
> to mails posted after a certain date, without removing the older ones
> from the mailbox. It is doable with / t but that makes me calculate
> again and again the number of days since the 'filter date'. Because / t
> requires to enter a number of days and not a date...
>
> Thanks for helping !
> --
> erik

OK, maybe this can help you:

---------------------------------------------------------------
(defun gnus-summary-limit-to-date (date &optional after-p)
  "Limit the summary buffer to articles before DATE.
If AFTER-P (the prefix) is non-nil, limit the summary buffer to
articles that are after DATE."
  (interactive 
   (let ((after current-prefix-arg)
	 date-string)
     (setq date-string
	   (if after
	       (read-string "Limit to after the date: ")
	     (read-string "Limit to before the date: ")))
     (list date-string after)))
  (let (date-string age)
    (setq date-string
	  (if (string-match-p ":+" date)
	      date
	    (concat date " 00:00" )))
    (setq age (days-between (current-time-string) date-string))
    (gnus-summary-limit-to-age age after-p)))
----------------------------------------------------------------

Put this in your .emacs or .gnus file, then in the summary buffer do
M-x gnus-summary-limit-to-date RET.
It prompts you for a date to limit articles before that date or after if
a prefix argument is given (i.e. C-u M-x gnus-summary-limit-to-date RET).

Note that the date is in a format accepted by `parse-time-string', for
example: "2012-01-01" or "Mon, 30 Apr 2012 22:40:05 -0500", etc.

I hope this can be useful. Let me know if it does not fit your needs.

--
Sergio




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

end of thread, other threads:[~2012-05-01  4:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-28  8:43 filtering mail from a group Erik Colson
2012-04-28 11:56 ` Andreas Schwab
2012-04-28 15:12   ` Erik Colson
2012-04-30  0:44     ` Sergio Martínez
2012-04-30  9:12       ` Erik Colson
2012-05-01  4:05         ` Sergio Martínez

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).