🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99957

Re: mailrc files

#99957
From: Robert D. Houk
Date: Wed, 11 Apr 1990 21:39
37 lines
2222 bytes
I recently posted a query about editing one's .mailrc file and then having
emacs studiously ignore the new file...I received a whole slew of replies
(some before I even saw my own posting!) - THANKX GUYS, YOU'RE GREAT.

This is the solution I have finally adopted - inspired by Mike Meissner's
solution, and a quick perusal of the code [OK, I prolly should'a done
this first, but it was the end of a *LONG* week and I was *TIRED*]. It
is somewhat simpler than Mike's solution, and works for at least the
simple mail/edit/mail cycle that I tried...

In .emacs:

; Coerce emacs into automagically rebuilding mail aliasii when .mailrc edited 
;    Inspired by Mike Meissner (meissner@osf.org)

(defun rebuild-mail-aliases ()
  "Hook to rebuild the mail aliases, whenever ~/.mailrc is stored."
  (if (string-equal buffer-file-name (expand-file-name "~/.mailrc"))
      (progn
	(setq mail-aliases t)		;Force sendmail to [re]read .mailrc
	nil)))				;Procede normally to save the file

(if (not (memq 'rebuild-mail-aliases write-file-hooks))
    (setq write-file-hooks (cons 'rebuild-mail-aliases
				 write-file-hooks)))


Again, thankx to all who responded (and to whom my mail replies bounced...)

					-RDH
--
  "If you build a system                 RDH@SLI.COM  |	 uunet!sli!rdh
 that even a fool could use,             Robert D. Houk
   then only a fool                      Software Leverage, Inc.
 would want to use your system."         485 Massachusetts Avenue
        -Somebody-r-Other's Law          Arlington, Mass.  02174
                                         Office (617) 648-1414
Technical Details
Message-ID: <9004112139.AA02710@borodin.>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!snorkelwacker!tut.cis.ohio-state.edu!sli.com!rdh

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,fee184a1ec44c4a3
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-04-11 14:39:51 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!snorkelwacker!tut.cis.ohio-state.edu!sli.com!rdh
From: rdh@sli.com (Robert D. Houk)
Newsgroups: gnu.emacs.bug
Subject: Re: mailrc files
Message-ID: <9004112139.AA02710@borodin.>
Date: 11 Apr 90 21:39:51 GMT
Sender: usenet_news@tut.cis.ohio-state.edu
Reply-To: rdh@sli.com (or uunet!sli!rdh)
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 37
Posted: Wed Apr 11 22:39:51 1990