From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/27868 Path: main.gmane.org!not-for-mail From: "BrYan P. Johnson" Newsgroups: gmane.emacs.gnus.general Subject: Announce: gnus-filterhist.el version 1.1 Date: 07 Dec 1999 11:15:44 -0500 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=Treasury-NORAD-FBI-Nazi-spy-bomb-DES-Serbian-fissionable-BATF-$400=m" X-Trace: main.gmane.org 1035164815 26789 80.91.224.250 (21 Oct 2002 01:46:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 01:46:55 +0000 (UTC) Return-Path: Original-Received: from bart.math.uh.edu (bart.math.uh.edu [129.7.128.48]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id LAA05044 for ; Tue, 7 Dec 1999 11:16:49 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by bart.math.uh.edu (8.9.1/8.9.1) with ESMTP id KAB19109; Tue, 7 Dec 1999 10:16:33 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 07 Dec 1999 10:16:45 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id KAA20334 for ; Tue, 7 Dec 1999 10:16:31 -0600 (CST) Original-Received: from honky.eng.mindspring.net (honky.eng.mindspring.net [207.69.192.164]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id LAA05025 for ; Tue, 7 Dec 1999 11:16:06 -0500 (EST) Original-Received: (from beej@localhost) by honky.eng.mindspring.net (8.9.3/8.9.3) id LAA21309; Tue, 7 Dec 1999 11:15:45 -0500 Original-To: ding@gnus.org Original-Newsgroups: gnu.emacs.sources,gnu.emacs.gnus Original-Followup-To: gnu.emacs.gnus Original-Lines: 33 User-Agent: Gnus/5.070099 (Pterodactyl Gnus v0.99) XEmacs/21.1 (20 Minutes to Nikko) Posted-To: gnu.emacs.sources,gnu.emacs.gnus Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:27868 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:27868 The following message is a courtesy copy of an article that has been posted to gnu.emacs.sources,gnu.emacs.gnus as well. --=Treasury-NORAD-FBI-Nazi-spy-bomb-DES-Serbian-fissionable-BATF-$400=m gnus-filterhist.el creates a buffer with a summary of the number of messages you've received per mailbox. This summary is cleared every time you check mail. The buffer name is *Filter History* and the summary looks like this: Wed Nov 10 10:21:05 1999 -- Current Split -- Work-In : 1 -- Session Split -- Work-In : 1 Chiplist : 5 The most recent version is available at Changes in version 1.1 + Made gnus-filter-history non-destructive with regards to nnmail variables. + Added a special font for the buffer so that if you want to change it you can (I like mine much smaller than the default font). BrYan -- Triangle man hates Particle man. --=Treasury-NORAD-FBI-Nazi-spy-bomb-DES-Serbian-fissionable-BATF-$400=m Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=gnus-filterhist.el Content-Description: Filter History for gnus ;;; gnus-filterhist.el --- Gnus Filter Histories -- parse nnmail-split-history to provide reports of mail splits. ;; Copyright (C) 1999 BrYan P. Johnson ;; Author: BrYan P. Johnson ;; Keywords: news, mail ;; gnus-filterhist.el is free software; you can redistribute it and/or modify it ;; under the terms of the GNU General Public License as published by the Free ;; Software Foundation; either version 2, or (at your option) any later ;; version. ;; gnus-pers.el is distributed in the hope that it will be useful, but WITHOUT ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ;; more details. ;; You should have received a copy of the GNU General Public License along ;; with GNU Emacs; see the file COPYING. If not, write to the Free Software ;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ;; Commentary: ;; Creates a buffer with a summary of the number of messages you've received per mailbox. ;; This summary is cleared every time you check mail. The buffer name is *Filter History* ;; To run: ;; in your .gnus: ;; (require 'gnus-filterhist) ;; (add-hook 'gnus-group-mode-hook 'gnus-filter-history) ;; (add-hook 'gnus-after-getting-new-news-hook 'gnus-filter-history) ;; I also have set up a window configuration like so: ;; (gnus-add-configuration ;; '(group ;; (horizontal 1.0 ;; (vertical 0.25 ;; (group 0.85 point) ;; ("*Filter History*" 1.0) ;; ) ;; ("*scratch*" 1.0) ;; ))) ;; Todo: ;;+ buttonize group names to open that group. ;;+ perhaps put current-split and session-split each in their own column. You can try this by setting gnus-filter-history-column-view to t ;;; History: ;; 1999/12/07 BrYan P. Johnson ;; Made this whole deal non-destructive with regards to nnmail variables. ;; Added a special font for the buffer so that if you want to change it you can (I like mine much smaller than the default font). ;; ;; 1999/11/08 BrYan P. Johnson ;; Added session history. Added ability to clear session history. ;; ;; 1999/10/05 aaron .'. culich ;; General cleanup to make things more concise. ;; ;; 1999/10/04 BrYan P. Johnson ;; Created. ;;; Code: (eval-when-compile (require 'cl)) (require 'nnmail) (defvar gnus-filter-history-show-session-history t "Show a session history.") (defvar gnus-filter-history-show-current-split-history t "Show the current split.") (defvar nnmail-session-split-history nil "session history for mail splits") (defvar nnmail-current-split-history nil "Split history used by gnus-filter-history") (defvar gnus-filter-history-column-view nil "Show filter history in two columns rather than one. This is untested.") (defface gnus-filterhist-face-1 nil "Face used in gnus-filterhist buffer.") (defun gnus-filter-history-clear-session () "Clear the current gnus-filter-history-session" (interactive) (setq nnmail-session-split-history nil)) (defun gnus-filter-history-get-current-split () "Determine which portions of nnmail-split-history are the current split." (let* ((current-nnmail-split-history nnmail-split-history) my-current-splits my-current-split) (progn (setq my-current-splits (or (mapcar '(lambda (x) (let ((y (if (and x (not (member x nnmail-current-split-history))) x))) (if y y))) current-nnmail-split-history) current-nnmail-split-history)) (setq my-current-split (delete nil my-current-splits)) (if nnmail-current-split-history (setq nnmail-current-split-history (append nnmail-current-split-history my-current-split)) (setq nnmail-current-split-history my-current-split)) my-current-split))) (defun gnus-filter-history () (interactive) (with-output-to-temp-buffer "*Filter History*" (save-excursion (let ((buf (current-buffer))) (switch-to-buffer "*Filter History*") (let* ((my-split-history (gnus-filter-history-get-current-split)) (my-session-split-history (append nnmail-session-split-history my-split-history)) (my-current-split-shown nil)) (progn (princ (current-time-string)) (if (and gnus-filter-history-show-current-split-history my-split-history) (progn (princ (concat "\n -- Current Split -- \n" (mapconcat (lambda (elem) (if elem (concat (car elem) " : " (number-to-string (cdr elem))))) (let ((history (sort (mapcar 'caar my-split-history) 'string<))) (mapcar (lambda (x) (cons x (count x history :test 'string=))) (let (new (tail history)) (while tail (or (member (car tail) new) (setq new (cons (car tail) new))) (setq tail (cdr tail))) (nreverse new)))) "\t\n") "\n")) (setq my-current-split-shown t)) (princ "\n -- No Current Split -- ")) (if gnus-filter-history-show-session-history (progn (let ((beg (point))) (progn (princ (concat "\n -- Session Split -- \n" (mapconcat (lambda (elem) (if elem (concat (car elem) " : " (number-to-string (cdr elem))))) (let ((history (sort (mapcar 'caar my-session-split-history) 'string<))) (mapcar (lambda (x) (cons x (count x history :test 'string=))) (let (new (tail history)) (while tail (or (member (car tail) new) (setq new (cons (car tail) new))) (setq tail (cdr tail))) (nreverse new)))) "\n"))) (if (and my-current-split-shown gnus-filter-history-column-view) (let* ((max (point-max)) (end (+ max 25)) ) (progn (goto-char max) (princ "\n ") (kill-rectangle beg end) (goto-char (point-min)) (end-of-line) (yank-rectangle) ) ) ))) (setq nnmail-session-split-history my-session-split-history) )))) (add-text-properties (point-min) (point-max) '(face gnus-filterhist-face-1)) (switch-to-buffer buf)) ))) (provide 'gnus-filterhist) --=Treasury-NORAD-FBI-Nazi-spy-bomb-DES-Serbian-fissionable-BATF-$400=m--