Xref: utzoo gnu.emacs.help:1104 comp.emacs:10033 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!tut.cis.ohio-state.edu!ansa.co.uk!ajw From: ajw@ansa.co.uk (Andrew Watson) Newsgroups: gnu.emacs.help,comp.emacs Subject: Re: RMAIL does something I don't understand... Message-ID: <9102071604.AA14490%crippen@ansa.co.uk> Date: 7 Feb 91 16:04:59 GMT References: <1991Feb5.020846.24982@mprgate.mpr.ca> Sender: daemon@tut.cis.ohio-state.edu Followup-To: gnu.emacs.help Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu Lines: 44 Mark Anderson wrote: > Aliases from the .mailrc file are stored in Emacs in the variable > mail-aliases. I suspect that changes to .mailrc after RMAIL reads it > the first time are not reflected in the variable. This is the case. > You can force Emacs > to read the .mailrc by setting mail-aliases to 't. I long ago got bored with this game and make the following small hack to ensure that editing the .mailrc (using emacs, of course) caused the variable to be reset automagically, and hence brought the changes made into effect immediately. Insert the following lines at the bottom of your .mailrc: # # Local Variables: # eval: (setup-mailrc-hook) # End: And put the following two function definitions in your .emacs, or where-ever: (defun mailrc-reset () (message "Reset aliases variable") (sit-for 1) (setq mail-aliases t) nil) ; this is rather important! (defun setup-mailrc-hook () (make-local-variable 'write-file-hooks) ; make it have a separate value here (setq write-file-hooks (cons 'mailrc-reset write-file-hooks))) . Regards, / \^ / / \ \ Andrew / / \ \ '=========` Andrew Watson Tel: +44 223 323010 /| |\ | < |\ APM Ltd, Poseidon House, Fax: +44 223 359779 / | | \| _> | \ Castle Park, UUCP: mcsun!ukc!ansa!ajw --------------- Cambridge CB3 0RD, UK Internet: ajw@ansa.co.uk