Xref: utzoo gnu.emacs.help:1935 comp.emacs:10650 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tut.cis.ohio-state.edu!unreplyable!garbage From: tsilva%aaec1.UUCP@DSPVAX.MIT.EDU (Tony Silva) Newsgroups: gnu.emacs.help,comp.emacs Subject: accessing environment variables in Lisp expressions Message-ID: <9105022259.AA17238@aaec.com.uucp> Date: 2 May 91 22:59:30 GMT Sender: daemon@tut.cis.ohio-state.edu Followup-To: gnu.emacs.help Distribution: world Organization: Gatewayed from the GNU Project mailing list help-gnu-emacs@prep.ai.mit.edu Lines: 50 After putting: (setq mail-archive-file-name "/u/tsilva/SMAIL.tmp") in my ~/.emacs file, I can successfully send a message (to myself) with a copy written to SMAIL.tmp in my home directory: To: tsilva Subject: test FCC: /u/tsilva/SMAIL.tmp --text follows this line-- using /u/tsilva/SMAIL.tmp However, I don't like hardwiring the directory name "/u/tsilva" in the Lisp expression above. I can't seem to figure out how to utilize the $HOME environment variable. I tried: (setq mail-archive-file-name "$HOME/SMAIL.tmp") and then To: tsilva Subject: test FCC: $HOME/SMAIL.tmp --text follows this line-- using $HOME/SMAIL.tmp which failed with the following message: Opening output file: no such file or directory, /u/tsilva/$HOME/SMAIL.tmp The expression: (setq mail-archive-file-name "/$HOME/SMAIL.tmp") also failed. I'm sure there's a simple way to use $HOME. Any hints? Thanks in advance. ------------------------------------------------------------------------------- Tony Silva Atlantic Aerospace Electronics Corp. 470 Totten Pond Road Waltham, MA 02154 voice: (617)890-4200 FAX: (617)890-0224 Internet: tsilva%aaec1.uucp@dspvax.mit.edu UUCP: ...!seismo!dspvax!aaec1!tsilva