Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: ding@gnus.org
Subject: Re: M-d in an imap summary
Date: Tue, 04 Nov 2008 12:20:56 -0600	[thread overview]
Message-ID: <86iqr3tks7.fsf@lifelogs.com> (raw)
In-Reply-To: <muxhc6n4mvr.fsf@uzeb.lrde.epita.fr>

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




  reply	other threads:[~2008-11-04 18:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 16:02 Didier Verna
2008-11-03 17:11 ` Ted Zlatanov
2008-11-04 13:54   ` Didier Verna
2008-11-04 18:20     ` Ted Zlatanov [this message]
2008-11-04 20:06       ` Didier Verna

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86iqr3tks7.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).