How to wrap emacs startup with application that dynamically sets particular environment variables?

KARR, DAVID dk068x@att.com
Fri Oct 18 21:36:14 GMT 2024


I'm looking at a situation where I'm going to need to write a small application that takes a command line to run, but first gets some data from an external source and sets environment variables from the response, so those variables are set in the subshell it starts.  It would be straightforward to add this to a command line that I run in the shell, but I'd really like to wrap this with my running of Emacs itself.  I currently use the following in my Emacs shortcut:

    C:\cygwin64\bin\run2.exe --display 127.0.0.1:0.0 /usr/local/bin/emacs.xml

I see that the "emacs.xml" file allows for some static environment variable values, but that won't help me.  If I simply change the shortcut to this:

    mywrapper C:\cygwin64\bin\run2.exe --display 127.0.0.1:0.0 /usr/local/bin/emacs.xml

Where "mywrapper" is the application I'm writing to get the env var settings, will that result in those environment variables being put into the environment of each shell buffer I start from Emacs?


More information about the Cygwin mailing list