* Programming spam-process-destination
@ 2011-06-29 12:16 Łukasz Stelmach
2011-06-30 14:40 ` Ted Zlatanov
0 siblings, 1 reply; 4+ messages in thread
From: Łukasz Stelmach @ 2011-06-29 12:16 UTC (permalink / raw)
To: ding
EHLO.
Is it possible to generate spam-process-destination (maybe other group
parameters too) based on gnus-newsgroup-name with a piece of code like
this:
--8<---------------cut here---------------start------------->8---
(defun generate-spam-destination (group)
(cond
((string-match ":SPAM$" group) nil)
((string-match "\\(nn\\(folder\\|imap\\)[^:]+\\):\\(.*\\)" group)
(concat (match-string 1 group) ":SPAM"))))
--8<---------------cut here---------------end--------------->8---
This is espcially important for me as I have several imap accounts and
most of them provide spam training by moving a message to the SPAM
folder.
--
Miłego dnia,
Łukasz Stelmach
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Programming spam-process-destination
2011-06-29 12:16 Programming spam-process-destination Łukasz Stelmach
@ 2011-06-30 14:40 ` Ted Zlatanov
2011-06-30 17:05 ` Łukasz Stelmach
0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2011-06-30 14:40 UTC (permalink / raw)
To: ding
On Wed, 29 Jun 2011 14:16:36 +0200 Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> wrote:
ŁS> EHLO.
ŁS> Is it possible to generate spam-process-destination (maybe other group
ŁS> parameters too) based on gnus-newsgroup-name with a piece of code like
ŁS> this:
ŁS> (defun generate-spam-destination (group)
ŁS> (cond
ŁS> ((string-match ":SPAM$" group) nil)
ŁS> ((string-match "\\(nn\\(folder\\|imap\\)[^:]+\\):\\(.*\\)" group)
ŁS> (concat (match-string 1 group) ":SPAM"))))
ŁS> This is espcially important for me as I have several imap accounts and
ŁS> most of them provide spam training by moving a message to the SPAM
ŁS> folder.
I think so using `gnus-parameters' but I don't use it, so you have to
look in the manual. FWIW I have a custom function that runs when I
enter a group because my logic is... let's say unusual :)
Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Programming spam-process-destination
2011-06-30 14:40 ` Ted Zlatanov
@ 2011-06-30 17:05 ` Łukasz Stelmach
2011-06-30 18:21 ` Ted Zlatanov
0 siblings, 1 reply; 4+ messages in thread
From: Łukasz Stelmach @ 2011-06-30 17:05 UTC (permalink / raw)
To: ding
Ted Zlatanov <tzz@lifelogs.com> writes:
> On Wed, 29 Jun 2011 14:16:36 +0200 Łukasz Stelmach
> <lukasz.stelmach@iem.pw.edu.pl> wrote:
ŁS>> EHLO.
ŁS>> Is it possible to generate spam-process-destination (maybe other
ŁS>> group parameters too) based on gnus-newsgroup-name with a piece of
ŁS>> code like this:
[...]
> I think so using `gnus-parameters' but I don't use it, so you have to
> look in the manual. FWIW I have a custom function that runs when I
> enter a group because my logic is... let's say unusual :)
Could you be more elaborate on... the function ;)
--
Miłego dnia,
Łukasz Stelmach
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Programming spam-process-destination
2011-06-30 17:05 ` Łukasz Stelmach
@ 2011-06-30 18:21 ` Ted Zlatanov
0 siblings, 0 replies; 4+ messages in thread
From: Ted Zlatanov @ 2011-06-30 18:21 UTC (permalink / raw)
To: ding
On Thu, 30 Jun 2011 19:05:27 +0200 Łukasz Stelmach <lukasz.stelmach@iem.pw.edu.pl> wrote:
ŁS> Ted Zlatanov <tzz@lifelogs.com> writes:
>> On Wed, 29 Jun 2011 14:16:36 +0200 Łukasz Stelmach
>> <lukasz.stelmach@iem.pw.edu.pl> wrote:
ŁS> EHLO.
ŁS> Is it possible to generate spam-process-destination (maybe other
ŁS> group parameters too) based on gnus-newsgroup-name with a piece of
ŁS> code like this:
ŁS> [...]
>> I think so using `gnus-parameters' but I don't use it, so you have to
>> look in the manual. FWIW I have a custom function that runs when I
>> enter a group because my logic is... let's say unusual :)
ŁS> Could you be more elaborate on... the function ;)
(defun tzz-gnus-conditional-settings ()
"conditional gnus settings"
(interactive)
(let
;; could also be done with a concat "" gnus-newsgroup-name
((gnus-newsgroup-name (if (stringp gnus-newsgroup-name) gnus-newsgroup-name "")))
;; do personal SIKRIT stuff here
))
(add-hook 'gnus-select-group-hook 'tzz-gnus-conditional-settings)
(add-hook 'gnus-summary-mode-hook 'tzz-gnus-conditional-settings)
(tzz-gnus-conditional-settings)
Hope that helps...
Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-06-30 18:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-29 12:16 Programming spam-process-destination Łukasz Stelmach
2011-06-30 14:40 ` Ted Zlatanov
2011-06-30 17:05 ` Łukasz Stelmach
2011-06-30 18:21 ` Ted Zlatanov
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).