Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!rex!uflorida!math.ufl.edu!shadrach.math.ufl.edu!squash From: squash@math.ufl.edu (Jonathan King) Newsgroups: comp.emacs Subject: Re: Re-binding Control Keys Message-ID: Date: 13 Mar 91 19:04:11 GMT References: <1991Mar11.222925.25685@news.larc.nasa.gov> <1991Mar12.130902.11831@news.larc.nasa.gov> <39059@netnews.upenn.edu> <39062@netnews.upenn.edu> Sender: news@math.ufl.edu Followup-To: comp.emacs Distribution: na Organization: University of Florida Department of Mathematics Lines: 47 In-Reply-To: squash@math.ufl.edu's message of 12 Mar 91 16:23:44 In article <39062@netnews.upenn.edu> mejicovs@eniac.seas.upenn.edu writes: I would like to rebind C-c C-c in RMAIL to a set of commands (kind of like a Unix script). Unfortunately I have absolutely no idea how to do this. What I want it to do is to automatically save a copy of mail that I send out - and then send it for me. Preferrably, it would save it as an original file each time - but if that's too difficult then it's not completely necesary (I thought about imbedding the date or time in the filename - but I don't know how to do that either)... James, you refer to RMAIL. However, "sending" mail is done by mail mode, not by RMAIL mode. So it is perhaps C-c C-c in mail mode that you wish to define. However: It may be that what you want can be obtained by putting (setq mail-archive-file-name "~/outgoing.mail") into your .emacs file. This will cause the header FCC: ~/outgoing.mail to appear in your mail buffer whenever you send mail. (FCC stands for "file carbon copy"). If you don't delete this line before sending the mail, a copy will be appended (in RMAIL format if you want) to the file outgoing.mail (or whatever file name you set mail-archive-file-name to). This has an advantage over CC: --people who (R)eply to your mail messages won't send you two copies, which they would if they forgot to delete the CC: header. Jonathan PS. If this won't do what you want, then do (define-key mail-mode-map "^C^C" 'James-custom-mail-send-and-exit) (defun James-custom-mail-send-and-exit () (interactive) ) If you do not know how to write "defun"s, you'll need to consult the Elisp manual.