[comp.mail.elm] Conditional Statements in elmrc

phil@wubios.wustl.edu (J. Philip Miller) (11/14/89)

I find that there are certain defaults that change for me depending on where I
am, e.g. when I am at work I want the Print command on the main menu to print
on the system printer, when I am out of town, I have an alternative for
sending the stuff back to my PC.  Wanting differing options on the PAGER is
another.  Now of course I can go to the options window and change these, but I
tend to mess things up too much :-)

I thought about just adding some code to .login to copy the appropriate file
to .elm/elmrc, but then begin to think about what might happen if I had
multiple sessions going :-(

My next, great idea was to invent a syntax in elmrc which would allow a
conditional assignment, depending on the value of variables in the
environment.  This later design seemed to answer all of the dreams that I
could conjure up since I could also do things on a temporary basis as part of
a script as well as vary things by where/when I was logged onto my system.

Has anyone else had strange dreams like this?

-phil
-- 
     J. Philip Miller, Professor, Division of Biostatistics, Box 8067
	 Washington University Medical School, St. Louis MO 63110
phil@wubios.WUstl.edu - Internet  (314) 362-3617   phil@wubios.wustl - bitnet
uunet!wucs1!wubios!phil - UUCP              C90562JM@WUVMD - alternate bitnet

frankb@usource.SARASOTA.FL.US (Frank Bicknell) (11/14/89)

In article <967@wubios.wustl.edu> phil@wubios.UUCP (J. Philip Miller) writes:
> I find that there are certain defaults that change for me
> depending on where I am, e.g. when I am at work I want the Print
> command on the main menu to print on the system printer, when I
> am out of town, I have an alternative for sending the stuff back
> to my PC.  ...
> 
> I thought about just adding some code to .login to copy the
> appropriate file to .elm/elmrc, but then begin to think about
> what might happen if I had multiple sessions going :-(

Well, I have used a variation on that very idea for some time
with '.exrc' files for vi.  I use links instead of copying,
however, linking .exrc.ansi to .exrc in my home directory when I
log in on an ansi terminal for example.  

The same sort of idea could be used for .elm/elmrc.  I solve the
problem of multiple sessions by checking to see if I'm already
logged in; then not linking and printing a warning message in
case I am.  Since I can only be at one terminal at a time, it
rarely presents a problem :) .
-- 
Frank Bicknell
UniSource; 1405 Main St, Ste 709; Sarasota, FL 34236
attctc!usource!frankb || frankb@usource.SARASOTA.FL.US