From: Stefan Waldherr <stefan@waldherr.org>
Subject: standard replies made easy
Date: 16 Dec 1998 18:23:56 +0100 [thread overview]
Message-ID: <upk90g8ngpf.fsf@amadeus.waldherr.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 233 bytes --]
Hi,
I wrote a quick and dirty thing that helps people insert a predefined text
into a reply. It is intended for people who are sick of giving the same answer
to a number of people. The file should be self-explanatory.
cu
Stefan.
[-- Attachment #2: gnus-autoreply.el --]
[-- Type: application/octet-stream, Size: 2608 bytes --]
;; --------------------------------------------------------------------------------
;;
;; $Id: gnus-autoreply.el,v 1.2 1998/12/15 11:17:06 swa Exp $
;;
;; Stefan Waldherr <swa@cs.cmu.edu>
;;
;; --------------------------------------------------------------------------------
;;
;; Based on stuff from dsg@mitre.org (David S. Goldberg) and
;; SL Baur <steve@xemacs.org>
;;
;; --------------------------------------------------------------------------------
;;
;; Installation:
;; -------------
;; Put this file somewhere and load it from your .gnus file with, e.g.
;; (load-file (expand-file-name "~/bin/emacs/gnus-autoreply.el"))
;;
;; Create a bunch of standard replies and put them (with suggestive names)
;; into, say, ~/Mail/.autoreply. Change gnus-autoreply-dir accordingly.
;;
;; Usage:
;; ------
;;
;; Reply to a mail. In the *Article* buffer, hit `C-c r'. Choose the file
;; which you want to insert. Then change it and/or hit `C-c C-c' to send
;; the mail. Voila.
;;
;; --------------------------------------------------------------------------------
;;
;; $Log: gnus-autoreply.el,v $
;; Revision 1.2 1998/12/15 11:17:06 swa
;; Used steve's stuff.
;;
;; Revision 1.1 1998/12/15 11:05:16 swa
;; First version.
;;
;; --------------------------------------------------------------------------------
;; where the replies can be found
(setq gnus-autoreply-dir "/home/swa/Mail/.autoreply")
;; prefix it with `reply-' or something. If you want.
(setq gnus-autoreply-file-prefix "")
;; the function that takes care of choosing the file and inserting it
(defun gnus-summary-autoreply ()
"Automatic reply."
(interactive)
;(message-remove-header "from")
;(message-add-header "From: Patch Acknowledgement <steve@xemacs.org>"
;"X-Emacs-Patch-Ack: yes")
(message-goto-body)
(let ((gnus-autoreply-file
(completing-read "Reply File: "
(mapcar 'list
(directory-files
gnus-autoreply-dir nil
(regexp-quote gnus-autoreply-file-prefix)))
nil t gnus-autoreply-file-prefix))
(gnus-autoreplyed-user (save-excursion
(set-buffer gnus-article-buffer)
(or (message-fetch-field "Reply-To")
(message-fetch-field "From")))))
(if (= (length gnus-autoreply-file) 0)
(setq gnus-autoreply-file auto-default-reply-file))
(if (not gnus-autoreplyed-user)
(error "Error in message structure: no Reply-To or From lines."))
(insert-file-contents (concat gnus-autoreply-dir "/" gnus-autoreply-file))
))
;; define the key
(add-hook 'message-load-hook
(define-key message-mode-map [(control ?c) ?r] 'gnus-summary-autoreply))
[-- Attachment #3: Type: text/plain, Size: 181 bytes --]
--
Stefan Waldherr fax +49 431 8058 136
e-Mail stefan@waldherr.org
www http://www.waldherr.org/
next reply other threads:[~1998-12-16 17:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-16 17:23 Stefan Waldherr [this message]
1998-12-17 0:15 ` François Pinard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=upk90g8ngpf.fsf@amadeus.waldherr.org \
--to=stefan@waldherr.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).