help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs variables and Win Environment Variables


From: Oliver Scholz
Subject: Re: emacs variables and Win Environment Variables
Date: Mon, 02 Feb 2004 17:20:06 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/22.0.0 (windows-nt)

"Javier Oviedo" <email_joviedo@yahoo.com> writes:

> Hello all:
>
> Can emacs recognize and use Windows environment variables? For example...

[example]

> Instead, I'd like to use:
>
> (setq load-path (cons "%MY_EMACS_PATH%/site-lisp_21_2" load-path))

(getenv "MY_EMACS_PATH")

[...]
> Obviously, I would define MY_EMACS_PATH as a valid path. I prefer to use a
> windows environment variable, if possible...but I'd be open to using some
> sort emacs global variable or #define like mechanism. My goal is to not have
> hard coded paths and such things. I personally hate going in and modifying
> these things in every location. I'd like one central place to make the
> modification.

Why don't you just use a variable at the top of your .emacs? Then
you have really everything concerning you Emacs in one central
place and you don't have to click around in order to change the
environment variable. For example, I have this at the top of my
.emacs:

(defconst egoge-lisp-dir
  "~/share/emacs/")

Then I could do something like

(push (expand-file-name "nifty-lisp-directory"
                        egoge-lisp-dir)
      load-path)

[What I in fact do is to automatically add every directory in my
lisp-dir to the load-path, but that's a different story.]

    Oliver
-- 
14 Pluviôse an 212 de la Révolution
Liberté, Egalité, Fraternité!


reply via email to

[Prev in Thread] Current Thread [Next in Thread]