From: tfheen Date: Tue, 10 Jun 2008 00:03:42 +0000 (+0000) Subject: Be smarter wrt spam folder X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1c9683fd537bf6b7c79366d5d2774f1f352eeb3;p=dotfiles Be smarter wrt spam folder git-svn-id: file:///svn/tfheen/trunk/dotfiles@1253 8da78d58-1cd3-0310-bee5-d77bd1b3e8bf --- diff --git a/gnus b/gnus index 102a060..11a69c3 100644 --- a/gnus +++ b/gnus @@ -659,15 +659,19 @@ on multiple mail-followup-to headers" (setq tfheen-spam-folder (format-time-string "spam.%Y-%m")) (cw/for-host "luxevop" - (setq tfheen-spam-folder (format-time-string "INBOX/spam.%Y"))) - + (setq tfheen-spam-folder (lambda () (if (string-match "nnimap\\+mail\\.err\\.no" gnus-newsgroup-name) + (format-time-string "nnimap+mail.err.no:spam.%Y-%m") + (format-time-string "INBOX/spam.%Y"))))) + (defun tfheen-mark-as-spam () (interactive) ; (let ((buf (get-buffer-create "*Spam mark*")) ; (cacheid (tfheen-fetch-cacheid))) ; (and cacheid ; (start-process "spammark" buf "ssh" "vuizook" "spam" cacheid))) - (gnus-summary-move-article nil tfheen-spam-folder nil 'move) + (gnus-summary-move-article nil (if (stringp tfheen-spam-folder) + tfheen-spam-folder + (apply tfheen-spam-folder nil)) nil 'move) (gnus-summary-next-subject 1)) (defun tfheen-mark-as-ham ()