Hello,

I can answer just the first point -

On Mon, 05 Nov 2012 00:15:17 +0100, Sietse Brouwer <sbbrou...@gmail.com> wrote:

Lukáš wrote:
it seems that Ctx [re]defines the system variable HOME on its run

Did some digging, and indeed it does. This is what happens, if I read
the code correctly (lines 11681-11696 of context/bin/mtxrun):
* `homedir` is read from the environment variable USERPROFILE on
Windows, and from HOME on Linux.
* both USERPROFILE and HOME (and environment.homedir) are then set to
the value of `homedir`.

Questions this raises:

(1) Windows does not seem to use HOME

That's true, that's why I decided to use a variable of this name.

(it's not in any of the lists of
environment variables that I found), only HOMEDRIVE and HOMEPATH, so
what do you use it for?

That's true, too.

The HOMEPATH variable points to "c:/Document and Settings/blablabla" - I didn't want to change this variable to 
"my" value "d:/Lukas" as many programs may suppose location "c:/Document and Settings" and don't 
need to use "%HOMEPATH%" when they want to obtain the directory of user settings/data.

So, if possible (= when I CAN AFFECT some program behavior; like Ctx, gnuplot and other 
command-line oriented programs) I'm using "my" variable HOME.

Also, I redirected "My Documents" folder (under Windows) to "d:/Lukas".

Surprisingly, when you do this redirection (via "My Documents" properties - "Change Location" or 
similar button), "My Documents" location is changed but HOMEPATH variable keeps its default settings, 
"c:/Documents and Settings/...".

So the state of user documents folder is a bit "schizophrenic" from this moment as "My Documets" 
are redirected to "d:/Lukas" whilst HOMEPATH points to "c:/Documents and Settings/...".

As "My Documents" location is not detectable from the command line (supposing you don't use a tool which 
reads a key in the registry which contains the value of "My Documents" location), I defined (on all 
computers, notebooks etc. I'm working with) a new system [local] variable "HOME" which points to the same dir 
as "My Documents" and which was not in use by Windows.

There was no name HOME collision problem so far - so I choose this name.

Best regards,

Lukas


--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.      [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to