From: tfheen Date: Tue, 13 Feb 2007 13:37:57 +0000 (+0000) Subject: Mark spams too X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92586c6b99a4c9a7a7accf088c3d3cbbf2926ceb;p=dotfiles Mark spams too git-svn-id: file:///svn/tfheen/trunk/dotfiles@996 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/gnus b/gnus index d18da13..0f8acaa 100644 --- a/gnus +++ b/gnus @@ -620,16 +620,27 @@ on multiple mail-followup-to headers" (defun tfheen-mark-as-spam () (interactive) + (let ((buf (get-buffer-create "*Spam mark*")) + (cacheid (tfheen-fetch-cacheid))) + (and cacheid + (start-process "spammark" buf "ssh" "vawad" "spam" cacheid))) (gnus-summary-move-article nil (format-time-string "spam.%Y-%m") nil 'move) (gnus-summary-next-subject 1)) -(defun tfheen-kill-ring-cacheid () +(defun tfheen-mark-as-ham () (interactive) + (let ((buf (get-buffer-create "*Ham mark*"))) + (start-process "spammark" buf "ssh" "vawad" "ham" (tfheen-fetch-cacheid)))) + +(defun tfheen-fetch-cacheid () (save-excursion (set-buffer gnus-article-buffer) - (message-narrow-to-headers-or-head) - (kill-new (message-fetch-field "x-crm114-cacheid")) - (widen))) + (message-fetch-field "x-crm114-cacheid"))) + +(defun tfheen-kill-ring-cacheid () + (interactive) + (kill-new (tfheen-fetch-cacheid)) + (widen)) (cw/for-host "yiwaz\\|thosu\\|golem\\|xoog" (define-key gnus-summary-backend-map "s" 'tfheen-mark-as-spam) @@ -747,3 +758,4 @@ Argument REVERSE means reverse order." (add-to-list 'gnus-extra-headers 'X-CRM114-Score) (add-to-list 'nnmail-extra-headers 'X-CRM114-Score) +