Gnus development mailing list
 help / color / mirror / Atom feed
* autoreply function?
@ 1998-07-21 18:42 Stefan Waldherr
  1998-07-21 19:25 ` David S. Goldberg
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Waldherr @ 1998-07-21 18:42 UTC (permalink / raw)


Hi,

anyone knows of an autoreply function for gnus? I envision something where you
read an incoming mail, hit one or two keys and gnus will cite the original,
append a pre-defined reply and send it. This feature would really be cool if
you have to reply more or less the same stuff to a number of incoming mails
(not at the same time, of course).

Thanks,
Stefan.
-- 
Stefan Waldherr                   fax +49 431 8058 136
                               e-Mail swa@cs.cmu.edu
                                  www http://www.waldherr.org/


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: autoreply function?
  1998-07-21 18:42 autoreply function? Stefan Waldherr
@ 1998-07-21 19:25 ` David S. Goldberg
  1998-07-22  4:35 ` Paul Franklin
  1998-07-24  8:29 ` SL Baur
  2 siblings, 0 replies; 4+ messages in thread
From: David S. Goldberg @ 1998-07-21 19:25 UTC (permalink / raw)
  Cc: ding

[-- Attachment #1: Type: text/plain, Size: 374 bytes --]

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

[-- Attachment #2: Type: text/plain, Size: 1124 bytes --]

(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)))

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: autoreply function?
  1998-07-21 18:42 autoreply function? Stefan Waldherr
  1998-07-21 19:25 ` David S. Goldberg
@ 1998-07-22  4:35 ` Paul Franklin
  1998-07-24  8:29 ` SL Baur
  2 siblings, 0 replies; 4+ messages in thread
From: Paul Franklin @ 1998-07-22  4:35 UTC (permalink / raw)


Well, I do something sort of weird to achieve the same effect:

(defun pdf-gnus-group-hack-cwd ()
  "Change the current directory, so POP mail gets checked."
  (setq default-directory nnml-directory))
(add-hook 'gnus-group-mode-hook 'pdf-gnus-group-hack-cwd)

With this in place, I start with the keystrokes
	R C-x i
and then I use filename completion to enter the response I want.

You should probably not use nnml-directory, and you might actually
want to set it in a message-mode hook.  (Setting it here will only
set it for message buffers coming from Gnus.  I think.)  Another
idea is
  (setq default-directory (concat gnus-directory "tmpl/"))
(I was setting the current directory for different reasons, and
stumbled upon this "feature", which I originally considered a side
effect.)

--Paul

>>>>> Stefan Waldherr writes:

 > anyone knows of an autoreply function for gnus? I envision
 > something where you read an incoming mail, hit one or two keys
 > and gnus will cite the original, append a pre-defined reply and
 > send it. This feature would really be cool if you have to reply
 > more or less the same stuff to a number of incoming mails (not at
 > the same time, of course).


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: autoreply function?
  1998-07-21 18:42 autoreply function? Stefan Waldherr
  1998-07-21 19:25 ` David S. Goldberg
  1998-07-22  4:35 ` Paul Franklin
@ 1998-07-24  8:29 ` SL Baur
  2 siblings, 0 replies; 4+ messages in thread
From: SL Baur @ 1998-07-24  8:29 UTC (permalink / raw)


Stefan Waldherr <swa@cs.cmu.edu> writes in ding@gnus.org:

> anyone knows of an autoreply function for gnus? I envision something
> where you read an incoming mail, hit one or two keys and gnus will
> cite the original, append a pre-defined reply and send it.

I have used the following in the past ...

(defun message-patch-ack ()
  "Semi-Automated Patch Acknowledgement."
  (interactive)
  (message-remove-header "from")
  (message-add-header "From: Patch Acknowledgement <steve@xemacs.org>"
                      "X-Emacs-Patch-Ack: yes")

  (message-goto-body)
  (if emacs-beta-version
      (insert "Thanks for the patches, they've been applied to XEmacs-"
              (format "%d.%d-beta%d"
                      emacs-major-version
                      emacs-minor-version
                      emacs-beta-version)
              ".\n\n")
    (insert "Thanks for the patches, they've been applied to XEmacs-"
            (format "%d.%d-pre"
                    emacs-major-version
                    emacs-minor-version)
            ".\n\n")))

(add-hook 'message-load-hook
          (define-key message-mode-map [(control ?c) ?p] 'message-patch-ack))


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-07-24  8:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-21 18:42 autoreply function? Stefan Waldherr
1998-07-21 19:25 ` David S. Goldberg
1998-07-22  4:35 ` Paul Franklin
1998-07-24  8:29 ` SL Baur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).