Gnus development mailing list
 help / color / mirror / Atom feed
* standard replies made easy
@ 1998-12-16 17:23 Stefan Waldherr
  1998-12-17  0:15 ` François Pinard
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Waldherr @ 1998-12-16 17:23 UTC (permalink / 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/

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

* Re: standard replies made easy
  1998-12-16 17:23 standard replies made easy Stefan Waldherr
@ 1998-12-17  0:15 ` François Pinard
  0 siblings, 0 replies; 2+ messages in thread
From: François Pinard @ 1998-12-17  0:15 UTC (permalink / raw)
  Cc: ding

Stefan Waldherr <stefan@waldherr.org> writes:

> 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.

Not that I'm sick of giving the same answer to a number of people, I'm
quite patient for such things, or at least, I hope so :-).  However,
it saves me some time being able to use canned sentences or paragaphs,
which time may be reinvested more usefully.

I rather just use this in my `emacs':

======================================================================>
(define-abbrev-table 'mail-mode-abbrev-table '(

    ;;; Maintenance - messages with signature.

    ("mack" "\
I'm filing your report.  Let me write to you again when the time comes
for me to work on this problem.  My work queue is lengthy, it may take
a good while.  But I'm not forgetting you.  Thanks for caring!

-- The maintainer" nil 0)

    ("mdone" "\
I think this has already been fixed in the sources, here.  In any case,
let me thank you for reporting this problem.  Please confirm it is solved
when the next version comes out, or send a new bug report if not.

-- The maintainer" nil 0)

;;; [and so forth, I have many of those...]

    ))
======================================================================<

and whenever I compose a message, I just type mack, mdone, or any other such
things, at point where needed.  It is useful being able to assemble a reply
out of many pre-canned fragments.  Nobody has been offended so far.  (Hmph,
not quite...  _One_ user replied to me with nothing else than a big ASCII
drawing of a closed hand, with the middle finger pointing towards heaven! :-)

-- 
François Pinard                            mailto:pinard@iro.umontreal.ca
Join the free Translation Project!    http://www.iro.umontreal.ca/~pinard


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

end of thread, other threads:[~1998-12-17  0:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-16 17:23 standard replies made easy Stefan Waldherr
1998-12-17  0:15 ` François Pinard

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