emacs-devel
[Top][All Lists]
Advanced

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

Re: sourcing environment


From: Tak Ota
Subject: Re: sourcing environment
Date: Wed, 11 Oct 2006 09:07:45 -0700 (PDT)

Thanks for the suggestion.  I understand what you do but in my case I
don't prepare the shell scripts but they come as a part of software
development kit from system silicon vendors.  I used to hand translate
those shell scripts into custom elisp functions like you show below
but that soon got too cumbersome to maintain for multiple platforms.
What I want to automate is the following process without loosing the
currently opened buffers.

M-x kill-emacs
$ source env-xxx.sh
$ emacs

-Tak

Wed, 11 Oct 2006 04:35:16 -0400: Stephen Leake <address@hidden> wrote:

> Tak Ota <address@hidden> writes:
> 
> > ... When switching gears frequently between different cross
> > compilation environment it is common practice to set/change
> > environment variables by sourcing shell scripts.
> 
> I don't use shell scripts for this; I use Emacs functions:
> 
> (defun ghdl-0.25 ()
>   "ghdl only; run from a DOS shell"
>   (interactive)
>   (setq exec-path
>         (list
>          (expand-file-name "~/bin")
>          (getenv "INSTALL_BIN")
>          "c:/Gnu/Emacs/emacs-21.3/bin"
>          "c:/Gnu/Ghdl-0.25/bin"
>          "c:/Windows/system32"))
>   (setenv "PATH" (mapconcat 'identity  exec-path  path-separator))
>   )
>   
> (defun sal-no-network ()
>   "set LM_LICENSE_FILE to just the hardware key, to avoid network delays"
>   (interactive)
>   (setenv "LM_LICENSE_FILE" "foo")
>   )
> 
> -- 
> -- Stephe
> 





reply via email to

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