* emacs variables and Win Environment Variables
@ 2004-02-02 14:41 Javier Oviedo
2004-02-02 16:20 ` Oliver Scholz
2004-02-02 23:30 ` Kevin Rodgers
0 siblings, 2 replies; 3+ messages in thread
From: Javier Oviedo @ 2004-02-02 14:41 UTC (permalink / raw)
Hello all:
Can emacs recognize and use Windows environment variables? For example...
I currently use hard coded paths in these tow cases:
(setq load-path (cons "C:/data/joviedo/Emacs/site-lisp_21_2" load-path))
(defun my-load-DOTemacs ()
(interactive)
(find-file "C:/data/joviedo/emacs/_emacs21_2"))
Instead, I'd like to use:
(setq load-path (cons "%MY_EMACS_PATH%/site-lisp_21_2" load-path))
(defun my-load-DOTemacs ()
(interactive)
(find-file ""%MY_EMACS_PATH%/_emacs21_2"))
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.
Thanks in advance for any assistance.
--
Javier
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: emacs variables and Win Environment Variables
2004-02-02 14:41 emacs variables and Win Environment Variables Javier Oviedo
@ 2004-02-02 16:20 ` Oliver Scholz
2004-02-02 23:30 ` Kevin Rodgers
1 sibling, 0 replies; 3+ messages in thread
From: Oliver Scholz @ 2004-02-02 16:20 UTC (permalink / raw)
"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é!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: emacs variables and Win Environment Variables
2004-02-02 14:41 emacs variables and Win Environment Variables Javier Oviedo
2004-02-02 16:20 ` Oliver Scholz
@ 2004-02-02 23:30 ` Kevin Rodgers
1 sibling, 0 replies; 3+ messages in thread
From: Kevin Rodgers @ 2004-02-02 23:30 UTC (permalink / raw)
Javier Oviedo wrote:
> Can emacs recognize and use Windows environment variables? For example...
Of course: M-x apropos-documentation RET environment variable RET
> I currently use hard coded paths in these tow cases:
>
> (setq load-path (cons "C:/data/joviedo/Emacs/site-lisp_21_2" load-path))
>
> (defun my-load-DOTemacs ()
> (interactive)
> (find-file "C:/data/joviedo/emacs/_emacs21_2"))
>
>
> Instead, I'd like to use:
>
> (setq load-path (cons "%MY_EMACS_PATH%/site-lisp_21_2" load-path))
>
> (defun my-load-DOTemacs ()
> (interactive)
> (find-file ""%MY_EMACS_PATH%/_emacs21_2"))
(find-file (substitute-in-file-name "$MY_EMACS_PATH/_emacs21_2"))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-02 23:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-02 14:41 emacs variables and Win Environment Variables Javier Oviedo
2004-02-02 16:20 ` Oliver Scholz
2004-02-02 23:30 ` Kevin Rodgers
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.