From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/15701 Path: main.gmane.org!not-for-mail From: dsg@mitre.org (David S. Goldberg) Newsgroups: gmane.emacs.gnus.general Subject: Re: autoreply function? Date: 21 Jul 1998 15:25:47 -0400 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: multipart/mixed; boundary="Multipart_Tue_Jul_21_15:25:47_1998-1" Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035154686 23519 80.91.224.250 (20 Oct 2002 22:58:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 22:58:06 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from gwyn.tux.org (gwyn.tux.org [207.96.122.8]) by altair.xemacs.org (8.9.1/8.9.1) with ESMTP id MAA12649 for ; Tue, 21 Jul 1998 12:32:19 -0700 Original-Received: from gizmo.hpc.uh.edu (gizmo.hpc.uh.edu [129.7.102.31]) by gwyn.tux.org (8.8.8/8.8.8) with ESMTP id PAA29280 for ; Tue, 21 Jul 1998 15:28:41 -0400 Original-Received: from sina.hpc.uh.edu (sina.hpc.uh.edu [129.7.3.5]) by gizmo.hpc.uh.edu (8.7.6/8.7.3) with ESMTP id NAS05569; Tue, 21 Jul 1998 13:59:22 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 21 Jul 1998 14:27:12 -0500 (CDT) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [209.195.19.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id OAA06706 for ; Tue, 21 Jul 1998 14:26:54 -0500 (CDT) Original-Received: from linus.mitre.org (linus.mitre.org [129.83.10.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id PAA06570 for ; Tue, 21 Jul 1998 15:26:54 -0400 (EDT) Original-Received: from blackbird.mitre.org (blackbird [129.83.65.14]) by linus.mitre.org (8.8.7/8.8.7) with ESMTP id PAA05939; Tue, 21 Jul 1998 15:26:52 -0400 (EDT) Original-Received: (from dsg@localhost) by blackbird.mitre.org (8.8.6/8.8.6) id PAA11778; Tue, 21 Jul 1998 15:25:48 -0400 (EDT) Original-To: Stefan Waldherr X-Face: GUaHTH@nS>[7,ME@-gYZ4#Wl{z"99k@[[Y8AcP0x1paqu.,z9,XSV1WI>{q3f6^e5(zrit <4fV&VHhmE`uidRqtmG27;si9&r;#KSF~E#$%W8w(xdp)H4tW=\2XOk~3=@oGqqpj;m4xf Ow;y26396&,34@9#~4;@*S;E0cq"LM9N(us4P%F(Nxis'Vvfm9?KufH;:Q$dMa-QWGLR&K d0`LJZE8xb*>^yN>b]_NcU:E=Zn\1=#/(OS2 In-Reply-To: Stefan Waldherr's message of "21 Jul 1998 20:42:41 +0200" Original-Lines: 48 X-Mailer: Gnus v5.6.23/Emacs 20.2 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:15701 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:15701 --Multipart_Tue_Jul_21_15:25:47_1998-1 Content-Type: text/plain; charset=US-ASCII It's not exactly what you want, but here's a starting point. It uses forward instead of reply because that was desirable for the project I designed it for (a sort of moderator function). It should be pretty easy to tailor it to your needs. -- Dave Goldberg Post: The Mitre Corporation\MS B305\202 Burlington Rd.\Bedford, MA 01730 Phone: 781-271-3887 Email: dsg@mitre.org --Multipart_Tue_Jul_21_15:25:47_1998-1 Content-Type: text/plain; charset=US-ASCII (defun auto-reject-message () "Forward to the current message back to its originator. Prompt for a rejection message file to include." (interactive) (call-interactively 'gnus-summary-show-article) (let ((auto-rejection-file (completing-read "Rejection File: " (mapcar 'list (directory-files auto-rejection-dir nil (regexp-quote auto-rejection-file-prefix))) nil t auto-rejection-file-prefix)) (auto-rejected-user (save-excursion (set-buffer gnus-article-buffer) (or (message-fetch-field "Reply-To") (message-fetch-field "From"))))) (if (= (length auto-rejection-file) 0) (setq auto-rejection-file auto-default-rejection-file)) (if (not auto-rejected-user) (error "Error in message structure: no Reply-To or From lines.")) (gnus-summary-mail-forward t) (goto-char (point-min)) (search-forward mail-header-separator nil 'limit nil) (insert "\n") (insert-file-contents (concat auto-rejection-dir auto-rejection-file)) (goto-char (point-min)) (message-goto-to) (insert auto-rejected-user) (message-send-and-exit))) --Multipart_Tue_Jul_21_15:25:47_1998-1--