Path: utzoo!attcan!uunet!cs.utexas.edu!usc!brutus.cs.uiuc.edu!psuvax1!husc6!encore!pierson From: pierson@encore.com (Dan L. Pierson) Newsgroups: comp.emacs Subject: Re: Auto copy in vm Message-ID: Date: 11 Apr 90 15:07:14 GMT References: Sender: news@Encore.COM Distribution: comp Organization: Encore Computer Corporation Lines: 59 In-reply-to: chittamu@quincy.cs.umass.edu's message of 9 Apr 90 00:42:00 GMT On 9 Apr 90 00:42:00 GMT, chittamu@quincy.cs.umass.edu (Satish Chittamuru) said: > In BSD mail I like the feature of having all my out-going messages recorded > automatically using > set record="filepath/filename" In youre .emacs: (setq mail-archive-file-name (expand-file-name "~/VM/sent-mail")) > Also, does vm read my .mailrc to setup aliases ? I don't think I want to > muck around with .emacs file everytime I want to add an alias(if it possible > to do so at all). Oflate my .emacs file is becoming a file_of_all_trades. VM (actually sendmail, VM reads mail but punts sending to the standard sender shipped with Emacs) reads my .mailrc just fine. Unfortunately, it only reads it the first time I send mail; changes won't be noticed in the same Emacs session. A quick look at the sources reveals that aliases are actually set up by build-mail-aliases (a non interactive command in mailalias.el) iff the variable mail-aliases is exactly t. There is also a command define-mail-alias to interactively add an alias for the current session (but not save it in .mailrc). So it looks like the way to change your aliases while Emacs is running is: Edit .mailrc M-ESC (build-mail-aliases) You could package this with something like: (defun add-mail-aliases () "Edit ~/.mailrc and rebuild aliases." (interactive) (save-window-excursion (find-file (expand-file-name "~/.mailrc")) (recursive-edit)) (build-mail-aliases)) Here are the relevant paragraphs from the GNU Emacs manual: If you have a `~/.mailrc' file, Emacs will scan it for mail aliases the first time you try to send mail in an Emacs session. Aliases found in the `To', `CC', and `BCC' fields will be expanded where appropriate. If the variable `mail-archive-file-name' is non-`nil', it should be a string naming a file; every time you start to edit a message to send, an `FCC' field will be put in for that file. Unless you remove the `FCC' field, every message will be written into that file when it is sent. -- dan In real life: Dan Pierson, Encore Computer Corporation, Research UUCP: {talcott,linus,necis,decvax}!encore!pierson Internet: pierson@encore.com