chittamu@quincy.cs.umass.edu (Satish Chittamuru) (04/09/90)
Emacs Gurus/Hackers/Omsbudsmen/Or_Whatever_You_Prefer_To_Be_Known as..... I have a question for those greatnesses (:-)) who are familiar with vm. In BSD mail I like the feature of having all my out-going messages recorded automatically using set record="filepath/filename" I was wondering if this is possible in vm. We are running vm 4.41. I do not know much about elisp or any lisp, so I can't really tell much from the sources and there is no mention about this in the vm manual. If someone knows about how to do this, I would appreciate any information they can give me. 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. Mucho Thanks to all who care to help. -- -Satish ( chittamu@cs.umass.edu || chittamu@umass.bitnet ) === Theory of Objectivity: E=MC++
pierson@encore.com (Dan L. Pierson) (04/11/90)
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
kim@kannel.lut.fi (Kimmo Suominen) (04/12/90)
>>>>> On 9 Apr 90 00:42:00 GMT, chittamu@quincy.cs.umass.edu (Satish
Chittamuru) said:
Satish> In BSD mail I like the feature of having all my out-going messages
Satish> recorded automatically using
Satish> set record="filepath/filename"
Satish> I was wondering if this is possible in vm.
Yes, put the following line in your .emacs
(setq mail-archive-file-name "~/Mail/Sent")
or use whatever file name you want to. That's my definition. If you want to
leave a message out of the file, just delete the FCC-header when editing the
message.
Satish> Also, does vm read my .mailrc to setup aliases ?
It does. Just don't have any whitespace (or anything else) in front of the
lines. In other words, the keyword "alias" has to begin from the first column
of a line.
Both of these features are actually not features of VM, but rather the basic
mail system included in GNU Emacs. VM uses them just as RMAIL uses them, too.
Kim
--
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
( Kimmo Suominen ! Lappeenranta U of Technology ! kim@kannel.lut.fi )
( "That's what I think" ! Computing Centre * Finland ! Funet: KUULA::KIM )
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''