From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79048 Path: news.gmane.org!not-for-mail From: =?iso-8859-2?B?UHJvY2jhemthIEx1a+G5IEluZy4gLSBQb250ZXggcy4gci4gby4=?= Newsgroups: gmane.comp.tex.context Subject: Re: System variable HOME Date: Mon, 05 Nov 2012 09:15:52 +0100 Message-ID: References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1352105472 25089 80.91.229.3 (5 Nov 2012 08:51:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2012 08:51:12 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 05 09:51:20 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TVIOt-00076r-Nu for gctc-ntg-context-518@m.gmane.org; Mon, 05 Nov 2012 09:51:19 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6372710203; Mon, 5 Nov 2012 09:51:10 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nQxCck-sIijo; Mon, 5 Nov 2012 09:51:08 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id B952B10218; Mon, 5 Nov 2012 09:51:08 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F36AC10218 for ; Mon, 5 Nov 2012 09:51:07 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id aoVnKjVq1B7g for ; Mon, 5 Nov 2012 09:51:05 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id CB93910203 for ; Mon, 5 Nov 2012 09:51:05 +0100 (CET) Original-Received: from mail.pontex.cz (mail.pontex.cz [89.233.168.98]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qA58p2E5003674 for ; Mon, 5 Nov 2012 09:51:04 +0100 Original-Received: from localhost ([127.0.0.1]) by mail.pontex.cz (Kerio MailServer 6.6.2) for ntg-context@ntg.nl; Mon, 5 Nov 2012 09:15:53 +0100 In-Reply-To: User-Agent: Opera Mail/12.02 (Win32) X-Bayes-Prob: 0.5272 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=89.233.168.98; country=CZ; region=52; city=Prague; latitude=50.0833; longitude=14.4667; http://maps.google.com/maps?q=50.0833,14.4667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RIjIP2L5 - b9a0ea2c8a95 - 20121105 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:79048 Archived-At: Hello, I can answer just the first point - On Mon, 05 Nov 2012 00:15:17 +0100, Sietse Brouwer wr= ote: > Luk=E1=B9 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 di= dn'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 "%HO= MEPATH%" when they want to obtain the directory of user settings/data. So, if possible (=3D when I CAN AFFECT some program behavior; like Ctx, gnu= plot 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 b= ut HOMEPATH variable keeps its default settings, "c:/Documents and Settings= /...". So the state of user documents folder is a bit "schizophrenic" from this mo= ment as "My Documets" are redirected to "d:/Lukas" whilst HOMEPATH points t= o "c:/Documents and Settings/...". As "My Documents" location is not detectable from the command line (supposi= ng you don't use a tool which reads a key in the registry which contains th= e value of "My Documents" location), I defined (on all computers, notebooks= etc. I'm working with) a new system [local] variable "HOME" which points t= o 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=E1=B9 Proch=E1zka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezov=E1 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 t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________