Great Circle Associates List-Managers
(February 2003)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: PLEASE DO NOT CC ME ON MESSAGES TO THIS
From: Vivek Khera <khera @ kcilink . com>
Date: Tue, 25 Feb 2003 14:44:13 -0500
To: list-managers @ greatcircle . com
In-reply-to: <15963 . 50586 . 161972 . 150537 @ gargle . gargle . HOWL>
References: <15963 . 39373 . 711990 . 761760 @ onceler . int . kciLink . com> <15963 . 50586 . 161972 . 150537 @ gargle . gargle . HOWL>

>>>>> "BAW" == Barry A Warsaw <bwarsaw @
 python .
 org> writes:

>>>>> "VK" == Vivek Khera <khera @
 kcilink .
 com> writes:

VK> I just set up my mail program (VM under XEmacs) to auto-delete
VK> messages with identical Message-ID headers.  It solves this
VK> problem quite nicely, and at much less cost than the bandwidth
VK> wasted on this whole discussion ;-)

BAW> Please post the code! :)

;;; purge duplicated messages (From Noah Friedman off Usenet)
(add-hook 'vm-arrived-messages-hook 'vma-kill-duplicate-messages-by-message-id)

(defun vma-kill-duplicate-messages-by-message-id (&optional mp)
  "Mark as deleted any message with a duplicate message ID.
Any undeleted message which has a Message ID indentical to that of another
undeleted message in the same folder, is marked for deletion."
  (interactive)
  (vm-select-folder-buffer)
  (vm-check-for-killed-summary)
  (vm-error-if-folder-read-only)
  (vm-error-if-folder-empty)
  (let ((htbl (make-vector 103 0))
        (n 0)
        (case-fold-search t)
        mid)
    (unless mp
      (setq mp vm-message-list))
    (while mp
      (cond ((vm-deleted-flag (car mp)))
            (t
             (setq mid (vm-su-message-id (car mp)))
             (or mid (debug (car mp)))
             (when (intern-soft mid htbl)
               (vm-set-deleted-flag (car mp) t)
               (setq n (1+ n)))
             (intern mid htbl)))
      (setq mp (cdr mp)))
    (and (interactive-p)
         (message "%d duplicate%s marked deleted" n (if (= n 1) "" "s")))
    (vm-update-summary-and-mode-line)
    (when vm-move-after-killing
      (let ((vm-circular-folders (and vm-circular-folders
                                      (eq vm-move-after-killing t))))
        (vm-next-message 1 t executing-kbd-macro)))
    n))



References:
Indexed By Date Previous: Re: PLEASE DO NOT CC ME ON MESSAGES TO THIS
From: bwarsaw @ python . org (Barry A. Warsaw)
Next: Re: PLEASE DO NOT CC ME ON MESSAGES TO THIS
From: J C Lawrence <claw @ kanga . nu>
Indexed By Thread Previous: Re: PLEASE DO NOT CC ME ON MESSAGES TO THIS
From: bwarsaw @ python . org (Barry A. Warsaw)
Next: Re: PLEASE DO NOT CC ME ON MESSAGES TO THIS
From: Tom Neff <tneff @ grassyhill . net>

Google
 
Search Internet Search www.greatcircle.com