]> err.no Git - dotfiles/commitdiff
Mark spams too
authortfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Tue, 13 Feb 2007 13:37:57 +0000 (13:37 +0000)
committertfheen <tfheen@8da78d58-1cd3-0310-bee5-d77bd1b3e8bf>
Tue, 13 Feb 2007 13:37:57 +0000 (13:37 +0000)
git-svn-id: file:///svn/tfheen/trunk/dotfiles@996 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf

gnus

diff --git a/gnus b/gnus
index d18da13b41d2a45891c5c011012ebc30911aac48..0f8acaa3053e888843ae5f8bfe34d9b188280ef8 100644 (file)
--- 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)
+