Gnus development mailing list
 help / color / mirror / Atom feed
* M-d in an imap summary
@ 2008-11-03 16:02 Didier Verna
  2008-11-03 17:11 ` Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: Didier Verna @ 2008-11-03 16:02 UTC (permalink / raw)
  To: Gnus Beta Testers


       Hello,

I'd like to be able to M-d some articles in an nnimap summary buffer,
and have it do the ExpectedThing(tm), which would be to do the
equivalent of my gmail account function "Report Spam".

Does anybody have a ready-made recipe for this ?

Thanks.

-- 
Resistance is futile. You will be jazzimilated.

Scientific site:   http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com

EPITA/LRDE, 14-16 rue Voltaire, 94276 Le Kremlin-Bicêtre, France
Tel. +33 (0)1 44 08 01 85       Fax. +33 (0)1 53 14 59 22



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

* Re: M-d in an imap summary
  2008-11-03 16:02 M-d in an imap summary Didier Verna
@ 2008-11-03 17:11 ` Ted Zlatanov
  2008-11-04 13:54   ` Didier Verna
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2008-11-03 17:11 UTC (permalink / raw)
  To: ding

On Mon, 03 Nov 2008 17:02:20 +0100 Didier Verna <didier@xemacs.org> wrote: 

dvl> I'd like to be able to M-d some articles in an nnimap summary buffer,
dvl> and have it do the ExpectedThing(tm), which would be to do the
dvl> equivalent of my gmail account function "Report Spam".

dvl> Does anybody have a ready-made recipe for this ?

What is the ExpectedThing?

Ted




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

* Re: M-d in an imap summary
  2008-11-03 17:11 ` Ted Zlatanov
@ 2008-11-04 13:54   ` Didier Verna
  2008-11-04 18:20     ` Ted Zlatanov
  0 siblings, 1 reply; 5+ messages in thread
From: Didier Verna @ 2008-11-04 13:54 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding

Ted Zlatanov <tzz@lifelogs.com> wrote:

> On Mon, 03 Nov 2008 17:02:20 +0100 Didier Verna <didier@xemacs.org> wrote: 
>
> dvl> I'd like to be able to M-d some articles in an nnimap summary buffer,
> dvl> and have it do the ExpectedThing(tm), which would be to do the
> dvl> equivalent of my gmail account function "Report Spam".
>
> dvl> Does anybody have a ready-made recipe for this ?
>
> What is the ExpectedThing?

  This (don't bother; I ended up doing it myself):

(defadvice gnus-summary-mark-as-spam (around gnus activate)
  "Wrapper around the original `gnus-summary-mark-as-spam' function.
Detect calls within a GMail IMAP group, and move the article directly to the
spam folder."
  (let ((method (gnus-find-method-for-group gnus-newsgroup-name)))
    (if (and (eq (car method) 'nnimap)
	     (string= (cadr method) "gmail"))
	(gnus-summary-move-article n "nnimap+gmail:[Gmail]/Spam")
      ad-do-it)))

-- 
Resistance is futile. You will be jazzimilated.

Scientific site:   http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com

EPITA/LRDE, 14-16 rue Voltaire, 94276 Le Kremlin-Bicêtre, France
Tel. +33 (0)1 44 08 01 85       Fax. +33 (0)1 53 14 59 22



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

* Re: M-d in an imap summary
  2008-11-04 13:54   ` Didier Verna
@ 2008-11-04 18:20     ` Ted Zlatanov
  2008-11-04 20:06       ` Didier Verna
  0 siblings, 1 reply; 5+ messages in thread
From: Ted Zlatanov @ 2008-11-04 18:20 UTC (permalink / raw)
  To: ding

On Tue, 04 Nov 2008 14:54:48 +0100 Didier Verna <didier@xemacs.org> wrote: 

dvl> Ted Zlatanov <tzz@lifelogs.com> wrote:
>> On Mon, 03 Nov 2008 17:02:20 +0100 Didier Verna <didier@xemacs.org> wrote: 
>> 
dvl> I'd like to be able to M-d some articles in an nnimap summary buffer,
dvl> and have it do the ExpectedThing(tm), which would be to do the
dvl> equivalent of my gmail account function "Report Spam".
>> 
dvl> Does anybody have a ready-made recipe for this ?
>> 
>> What is the ExpectedThing?

dvl>   This (don't bother; I ended up doing it myself):

I don't use GMail so I needed some explanation.

dvl> (defadvice gnus-summary-mark-as-spam (around gnus activate)
dvl>   "Wrapper around the original `gnus-summary-mark-as-spam' function.
dvl> Detect calls within a GMail IMAP group, and move the article directly to the
dvl> spam folder."
dvl>   (let ((method (gnus-find-method-for-group gnus-newsgroup-name)))
dvl>     (if (and (eq (car method) 'nnimap)
dvl> 	     (string= (cadr method) "gmail"))
dvl> 	(gnus-summary-move-article n "nnimap+gmail:[Gmail]/Spam")
dvl>       ad-do-it)))

This is the same as setting the spam process destination for the
spam-move processing backend if you use spam.el, except it happens
immediately instead of when you exit the summary buffer.

If you do it with spam.el, you can use group/topic parameters or the
global gnus-spam-process-destinations variable to define the move
target, plus of course you can stack other backends in addition to just
moving the spam, and you can manage ham as well.

Ted




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

* Re: M-d in an imap summary
  2008-11-04 18:20     ` Ted Zlatanov
@ 2008-11-04 20:06       ` Didier Verna
  0 siblings, 0 replies; 5+ messages in thread
From: Didier Verna @ 2008-11-04 20:06 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding

Ted Zlatanov <tzz@lifelogs.com> wrote:

> This is the same as setting the spam process destination for the
> spam-move processing backend if you use spam.el, except it happens
> immediately instead of when you exit the summary buffer.
>
> If you do it with spam.el, you can use group/topic parameters or the
> global gnus-spam-process-destinations variable to define the move
> target, plus of course you can stack other backends in addition to
> just moving the spam, and you can manage ham as well.

  Hmmm, that's probably a better solution. I hadn't thought of using the
spam destination setting. Thanks for the hint.

-- 
Resistance is futile. You will be jazzimilated.

Scientific site:   http://www.lrde.epita.fr/~didier
Music (Jazz) site: http://www.didierverna.com

EPITA/LRDE, 14-16 rue Voltaire, 94276 Le Kremlin-Bicêtre, France
Tel. +33 (0)1 44 08 01 85       Fax. +33 (0)1 53 14 59 22



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

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

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-03 16:02 M-d in an imap summary Didier Verna
2008-11-03 17:11 ` Ted Zlatanov
2008-11-04 13:54   ` Didier Verna
2008-11-04 18:20     ` Ted Zlatanov
2008-11-04 20:06       ` Didier Verna

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