* Kill certain articles in certain groups all from gnus.el
@ 2013-04-25 3:04 jidanni
2013-04-25 6:44 ` Tassilo Horn
0 siblings, 1 reply; 3+ messages in thread
From: jidanni @ 2013-04-25 3:04 UTC (permalink / raw)
To: info-gnus-english
Gentlemen, I wish to
Kill (so I don't see them) all articles
that match Subject: /xxx/
whose group name matches: /yyy/
and have this all contained within my .gnus.el file for easy maintenance.
I don't want to have 15 identical files one for each group.
I don't want a global kill string that matches every group.
I don't want this stuck in some binary .eld file that I have to fight with gnus about who gets to edit it.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kill certain articles in certain groups all from gnus.el
2013-04-25 3:04 Kill certain articles in certain groups all from gnus.el jidanni
@ 2013-04-25 6:44 ` Tassilo Horn
2013-04-25 16:57 ` jidanni
0 siblings, 1 reply; 3+ messages in thread
From: Tassilo Horn @ 2013-04-25 6:44 UTC (permalink / raw)
To: info-gnus-english
jidanni@jidanni.org writes:
> Gentlemen, I wish to
> Kill (so I don't see them) all articles
> that match Subject: /xxx/
> whose group name matches: /yyy/
> and have this all contained within my .gnus.el file for easy maintenance.
>
> I don't want to have 15 identical files one for each group.
>
> I don't want a global kill string that matches every group.
>
> I don't want this stuck in some binary .eld file that I have to fight
> with gnus about who gets to edit it.
This is completely untested, but I think it should do the job. It
creates a score file /tmp/gnus.score that contains just one entry
assigning to xxx articles a score of -10000. Via gnus-parameters, this
score file will be used in yyy groups only. Additionally, the expunge
below limit is set to -9999 in those groups so that you don't see the
articles at all.
--8<---------------cut here---------------start------------->8---
(defvar my-gnus-yyy-score-file
(expand-file-name "gnus.score"
temporary-file-directory))
(with-temp-buffer
;; Every article with a Subject containing "xxx" gets a score of -10000.
(insert "((\"subject\" (\"xxx\" -10000 nil r)))")
(write-file my-gnus-yyy-score-file))
(setq gnus-parameters
`(("yyy" ;; In every group matching "yyy" use the score file generated
;; above.
(score-file . ,my-gnus-yyy-score-file)
;; Don't show articles with a score lower than -9999.
(gnus-summary-expunge-below -9999))))
--8<---------------cut here---------------end--------------->8---
Not sure, maybe there's a better way to do that...
Bye,
Tassilo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Kill certain articles in certain groups all from gnus.el
2013-04-25 6:44 ` Tassilo Horn
@ 2013-04-25 16:57 ` jidanni
0 siblings, 0 replies; 3+ messages in thread
From: jidanni @ 2013-04-25 16:57 UTC (permalink / raw)
To: Tassilo Horn; +Cc: info-gnus-english
OK this worked. Thanks.
(defvar my-gnus-yyy-score-file
(expand-file-name "gwene.tw.com.bdsm.groups.SCORE" temporary-file-directory))
(with-temp-buffer
(insert "((\"subject\" (\" 已經加入了 .* 群組。\" -10000 nil r)))")
(write-file my-gnus-yyy-score-file))
(setq
gnus-parameters
'(("gwene\.tw\.com\.bdsm\.groups\."
(gnus-summary-expunge-below -9999))))
;(setq gnus-home-score-file
; '(("gwene\.tw\.com\.bdsm\.groups\." my-gnus-yyy-score-file))) No go. Had to hardwire:
(setq gnus-home-score-file
'(("gwene\.tw\.com\.bdsm\.groups\." "/tmp/gwene.tw.com.bdsm.groups.SCORE")))
_______________________________________________
info-gnus-english mailing list
info-gnus-english@gnu.org
https://lists.gnu.org/mailman/listinfo/info-gnus-english
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-04-25 16:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-25 3:04 Kill certain articles in certain groups all from gnus.el jidanni
2013-04-25 6:44 ` Tassilo Horn
2013-04-25 16:57 ` jidanni
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).