From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/79319 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, 19 Nov 2012 09:16:12 +0100 Message-ID: References: <5097FB6A.7090201@wxs.nl> 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 1353312991 24763 80.91.229.3 (19 Nov 2012 08:16:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 19 Nov 2012 08:16:31 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 19 09:16:40 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 1TaMX1-0003ei-7z for gctc-ntg-context-518@m.gmane.org; Mon, 19 Nov 2012 09:16:39 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B22F71022B; Mon, 19 Nov 2012 09:16:28 +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 DMjRxkZyPELP; Mon, 19 Nov 2012 09:16:26 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 54EF110206; Mon, 19 Nov 2012 09:16:26 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 89B0110206 for ; Mon, 19 Nov 2012 09:16:25 +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 8B8gCLhRIp6L for ; Mon, 19 Nov 2012 09:16:23 +0100 (CET) Original-Received: from filter2-ams.mf.surf.net (filter2-ams.mf.surf.net [192.87.102.70]) by balder.ntg.nl (Postfix) with ESMTP id 56ED9101E6 for ; Mon, 19 Nov 2012 09:16:23 +0100 (CET) Original-Received: from mail.pontex.cz (mail.pontex.cz [89.233.168.98]) by filter2-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id qAJ8GKoE030887 for ; Mon, 19 Nov 2012 09:16:21 +0100 Original-Received: from localhost ([127.0.0.1]) by mail.pontex.cz (Kerio MailServer 6.6.2) for ntg-context@ntg.nl; Mon, 19 Nov 2012 09:16:17 +0100 In-Reply-To: <5097FB6A.7090201@wxs.nl> User-Agent: Opera Mail/12.10 (Win32) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=89.233.168.98; country=CZ; latitude=49.7500; longitude=15.5000; http://maps.google.com/maps?q=49.7500,15.5000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0QIpkgl6W - 785750fa92e2 - 20121119 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.70 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:79319 Archived-At: On Mon, 05 Nov 2012 18:46:18 +0100, Hans Hagen wrote: > On 11/5/2012 12:15 AM, Sietse Brouwer wrote: > >> (2) why would mtxrun set the variables and risk overwriting something? >> The comments suggest it is for the benefit of the cnf files, but still >> --- why overwrite? >> ossetenv("HOME", homedir) -- can be used in unix cnf files >> ossetenv("USERPROFILE",homedir) -- can be used in windows cnf files Wouldn't be better to set the "HOME" variable ONLY in the case it has not b= een defined? If I keep the code mentioned by Sietse - "Below: relevant code from mtxrun,= lines 11681-11696" ---- local homedir =3D --osgetenv(ostype =3D=3D "windows" and 'USERPROFILE'= or 'HOME') or '' osgetenv("HOME") or ostype =3D=3D "windows" and osgete= nv('USERPROFILE') -- <- MY PROPOSAL HERE if not homedir or homedir =3D=3D "" then homedir =3D char(127) -- we need a value, later we wil trigger on = it end homedir =3D file.collapsepath(homedir) ossetenv("HOME", homedir) -- can be used in unix cnf files ossetenv("USERPROFILE",homedir) -- can be used in windows cnf files environment.homedir =3D homedir ---- Lukas > > it just sets them local (for this run + subruns) > > Hans -- = 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 ___________________________________________________________________________= ________