Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!crdgw1!montnaro From: montnaro@spyder.crd.ge.com (Skip Montanaro) Newsgroups: comp.emacs Subject: Re: Rereading .mailrc (was Re: Auto copy in vm) Message-ID: Date: 12 Apr 90 02:32:35 GMT References: <165@exodus.Eng.Sun.COM> Sender: news@crdgw1.crd.ge.com Reply-To: montanaro@crdgw1.ge.com (Skip Montanaro) Organization: GE Corporate Research & Development, Schenectady, NY Lines: 45 In-reply-to: rfm@urth's message of 11 Apr 90 20:27:22 GMT The version of Emacs sendmail we use here recurses on source commands in your .mailrc file. We have over 1800 local mailnames aliased in a couple files, so referencing them when first you send mail from Emacs, or even on the rare occasion when you execute something like mail -s frobboz foo@bar.oz $(AFILE) echo '(load "~/emacs/mailalias" nil t)' >> $(AFILE) echo '$(foreach f,$^,(build-mail-aliases "$f") )' >> $(AFILE) echo '(set-buffer (find-file-noselect (expand-file-name "~/.mail-aliases")))' >> $(AFILE) echo "(erase-buffer) (insert \"(setq mail-aliases '\n\")" >> $(AFILE) echo '(insert (format "%s\n" mail-aliases)) (insert ")\n")' >> $(AFILE) echo '(save-buffer) (kill-buffer (current-buffer))' >> $(AFILE) echo '(message "Building mail aliases... Done")' >> $(AFILE) $(EMACS) -batch -l $(AFILE) rm -f $(AFILE) Executing the above Make actions on my SPARCStation takes about 1 minute. Loading the ~/.mail-aliases takes about 1 second. -- Skip (montanaro@crdgw1.ge.com)