Re: [code] [textadept] Environment variables on OS X

From: Mitchell <m.att.foicica.com>
Date: Wed, 13 Nov 2013 10:50:38 -0500 (Eastern Standard Time)

Hi Robert,

On Tue, 12 Nov 2013, Robert Gieseke wrote:

> Hi,
>
> when loading Textadept.app from the Dock or the Finder shell environment
> variables are not loaded. To set these there used to be a way to set
> these in a properties file[1]. Later OS X versions (10.8 I believe)
> changed this [2].
>
> Since Textadept already uses and sets environment variables in its
> launcher script I thought why not use this for setting $PATH and would
> like to propose the following addition to textadept_osx:
>
> # Source '~/.textadept/environment.sh' to set variables like $PATH when
> # opening Textadept.app from the Dock or the Finder.
> if [ -f $HOME/.textadept/environment.sh ]
> then . $HOME/.textadept/environment.sh
> fi
>
> In this script 'environment.sh' I can for example have
> export PATH=$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin
> export TEXTADEPTJIT=1
>
> I considered loading files like '.profile' or '.bash_profile' but this
> seems more error-prone to me. (If people like they can of course source
> their path settings from environment.sh.) Other OS X editors have
> internal path settings but since we don't have an os.setenv this could
> be a simple solution. There might be a better name than 'environment.sh'
> of course …

This sounds fine. I appreciate you taking the initiative to trudge through
this OSX stuff so I don't have to. I would suggest
`~/.textadept/osx_env.sh` to disambiguate. Also, is there a problem that
we hardcode `~/.textadept/` rather than use an equivalent to `_USERHOME`?

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 13 Nov 2013 - 10:50:38 EST

This archive was generated by hypermail 2.2.0 : Thu 14 Nov 2013 - 06:39:44 EST