ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Retrieving original value of enviroment variable HOME
@ 2020-05-06 15:43 context
  2020-05-07  6:54 ` Hans Hagen
  0 siblings, 1 reply; 18+ messages in thread
From: context @ 2020-05-06 15:43 UTC (permalink / raw)
  To: ConTeXt

Hello,

before I run ConTeXt, I set a (new) variable "HOME" to point to a 
particular directory.

ConTeXt changes its value during startup - it sets its value to 
%USERPROFILE% - I guess it is to unify environment somehow for all 
platforms ConTeXt supports; probably here:

---- data-ini.lua, ln. ~86
do

     local homedir = osgetenv(ostype == "windows" and 'USERPROFILE' or 
'HOME') or ''

     if not homedir or homedir == "" then
         homedir = char(127) -- we need a value, later we wil trigger on 
it
     end

     homedir = file.collapsepath(homedir)

     ossetenv("HOME",       homedir) -- can be used in unix cnf files 
<<<<<<<<<<<<<< HERE
     ossetenv("USERPROFILE",homedir) -- can be used in windows cnf files

     environment.homedir = homedir

end
----

But anyway - would it be possible to store the original value of HOME 
environment variable (if set) before it gets changed during 
initialization - e.g. to a Lua table?

- I would need to work with the original value in run-time (Win7 / WinX; 
ConTeXt MkIV).

Best regards,

Lukas
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-06 15:43 Retrieving original value of enviroment variable HOME context
@ 2020-05-07  6:54 ` Hans Hagen
  2020-05-07 10:30   ` context
  0 siblings, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2020-05-07  6:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/6/2020 5:43 PM, context@vivaldi.net wrote:
> Hello,
> 
> before I run ConTeXt, I set a (new) variable "HOME" to point to a 
> particular directory.
> 
> ConTeXt changes its value during startup - it sets its value to 
> %USERPROFILE% - I guess it is to unify environment somehow for all 
> platforms ConTeXt supports; probably here:
> 
> ---- data-ini.lua, ln. ~86
> do
> 
>      local homedir = osgetenv(ostype == "windows" and 'USERPROFILE' or 
> 'HOME') or ''
> 
>      if not homedir or homedir == "" then
>          homedir = char(127) -- we need a value, later we wil trigger on it
>      end
> 
>      homedir = file.collapsepath(homedir)
> 
>      ossetenv("HOME",       homedir) -- can be used in unix cnf files 
> <<<<<<<<<<<<<< HERE
>      ossetenv("USERPROFILE",homedir) -- can be used in windows cnf files
> 
>      environment.homedir = homedir
> 
> end
> ----
> 
> But anyway - would it be possible to store the original value of HOME 
> environment variable (if set) before it gets changed during 
> initialization - e.g. to a Lua table?
> 
> - I would need to work with the original value in run-time (Win7 / WinX; 
> ConTeXt MkIV).
I'll add

   environment.oldhome

being the original one (but no testing done here)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-07  6:54 ` Hans Hagen
@ 2020-05-07 10:30   ` context
  2020-05-08 12:18     ` Hans Hagen
  0 siblings, 1 reply; 18+ messages in thread
From: context @ 2020-05-07 10:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello Hans,

>> - I would need to work with the original value in run-time (Win7 / 
>> WinX; ConTeXt MkIV).
> I'll add
> 
>   environment.oldhome
> 
> being the original one (but no testing done here)

would be great, thank you!

I guess it will be available over the night (= ConTeXt latest)?

Lukas

> Hans
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-07 10:30   ` context
@ 2020-05-08 12:18     ` Hans Hagen
  2020-05-10 12:33       ` context
  0 siblings, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2020-05-08 12:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/7/2020 12:30 PM, context@vivaldi.net wrote:
> Hello Hans,
> 
>>> - I would need to work with the original value in run-time (Win7 / 
>>> WinX; ConTeXt MkIV).
>> I'll add
>>
>>   environment.oldhome
>>
>> being the original one (but no testing done here)
> 
> would be great, thank you!
> 
> I guess it will be available over the night (= ConTeXt latest)?

You can check it. Btw, when you're using lmtx there should be no real 
differences between for instance unix and windows, although on windows 
lmtx does support wide characters in environment variables, command line 
arguments, filenames, filelinks etc. (not that that matters much as one 
will seldom use more than ascii). Specific environment variables like 
HOME are a bit tricky on windows as they come in variants, so let me 
know if some more magic is needed.

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-08 12:18     ` Hans Hagen
@ 2020-05-10 12:33       ` context
  2020-05-10 15:20         ` Hans Hagen
  0 siblings, 1 reply; 18+ messages in thread
From: context @ 2020-05-10 12:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

Hello, Hans,

I've just renewed the Ctx Beta installation, but 'environment.oldhome' 
seems be unavailable.

Was I "too quick" with renewing Ctx?

Testing sample:

----
\starttext
   Ahoj
   \startluacode
     context(environment.oldhome or "??")
   \stopluacode
\stoptext
----

- prints "??".

I also attache the "status-of-update.lua" and the batch 
"first-setup.bat" (maybe a bit obsolete, but working so far) I used to 
renew Ctx.

Also result of "dir /s" is available here (~84 k packed):

   http://leteckaposta.cz/302654804

What am I doing wrong?

Best regards,

Lukas


On 2020-05-08 14:18, Hans Hagen wrote:

> You can check it. Btw, when you're using lmtx there should be no real
> differences between for instance unix and windows, although on windows
> lmtx does support wide characters in environment variables, command
> line arguments, filenames, filelinks etc. (not that that matters much
> as one will seldom use more than ascii). Specific environment
> variables like HOME are a bit tricky on windows as they come in
> variants, so let me know if some more magic is needed.
> 
> Hans

[-- Attachment #2: ChkEnv.mkiv --]
[-- Type: text/plain, Size: 106 bytes --]

\starttext
  Ahoj
  \startluacode
    context(environment.oldhome or "??")
  \stopluacode
\stoptext

[-- Attachment #3: ChkEnv.pdf --]
[-- Type: application/pdf, Size: 5720 bytes --]

[-- Attachment #4: status-of-update.lua --]
[-- Type: text/plain, Size: 812 bytes --]

-- generator : luat-sta.lua
-- state tag : whatever

return {
 ["context"]={
  ["version"]="beta",
 },
 ["engines"]={
  ["luatex"]=true,
  ["pdftex"]=true,
  ["xetex"]=true,
 },
 ["formats"]={
  ["cont-en"]=true,
  ["cont-nl"]=true,
  ["metafun"]=true,
 },
 ["info"]={
  ["comment"]="this file contains the settings of the last 'mtxrun --script update' run",
  ["count"]=138,
  ["date"]="2020-05-10 11:59:36",
  ["runtime"]=94.039,
  ["version"]=0.1,
 },
 ["modules"]={
  ["all"]=true,
 },
 ["paths"]={
  ["root"]="d:\\Ctx-Beta\\tex",
 },
 ["platforms"]={
  ["mswin"]=true,
  ["win64"]=true,
 },
 ["repositories"]={
  ["current"]=true,
 },
 ["rsync"]={
  ["flags"]={
   ["delete"]="--delete",
   ["normal"]="-rpztlv",
  },
  ["module"]="minimals",
  ["program"]="rsync",
  ["server"]="contextgarden.net::",
 },
}

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: first-setup.ba~ --]
[-- Type: text/x-msdos-batch; name=first-setup.ba~, Size: 1079 bytes --]

@echo off

setlocal

echo okay > ok.log
ruby -e "File.delete('ok.log')"
if not exist "ok.log" goto okay

echo.
echo You need to install Ruby first (if you want to use pdfTeX or XeTeX).
echo Fetching files anyway.
echo.

:okay


set OWNPATH=%~dp0
set CONTEXTROOT=%OWNPATH%tex

set PATH=%OWNPATH%bin;%CONTEXTROOT%\texmf-mswin\bin;%PATH%

set CYGWIN=nontsec

rsync -av --exclude 'rsync.exe' --exclude 'cygwin1.dll' --exclude 'cygiconv-2.dll' rsync://contextgarden.net/minimals/setup/mswin/bin/ bin

mtxrun --script ./bin/mtx-update.lua --force --update --make --engine=all --context=beta --texroot=%CONTEXTROOT% %*

echo.
echo When you want to use context, you need to initialize the tree with:
echo.
echo   %CONTEXTROOT%\setuptex.bat %CONTEXTROOT%
echo.
echo You can associate this command with a shortcut to the cmd prompt.
echo.

if not exist "ok.log" goto end

echo.
echo If you want to use pdfTeX or XeTeX you need to install Ruby first.
echo Remake formats or rerun this script afterwards.
echo.

del /q ok.log

:end

endlocal


[-- Attachment #6: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-10 12:33       ` context
@ 2020-05-10 15:20         ` Hans Hagen
  2020-05-11  7:44           ` context
  0 siblings, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2020-05-10 15:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/10/2020 2:33 PM, context@vivaldi.net wrote:

> I've just renewed the Ctx Beta installation, but 'environment.oldhome' 
> seems be unavailable.
are you ser HOME is set?

\ctxlua{print("1",environment.homedir)}
\ctxlua{print("2",environment.oldhome)}
\ctxlua{print("3",os.getenv("HOME"))}
\ctxlua{print("4",os.getenv("USERPROFILE"))}

gives 4 values here

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-10 15:20         ` Hans Hagen
@ 2020-05-11  7:44           ` context
  2020-05-11  8:51             ` Hans Hagen
  0 siblings, 1 reply; 18+ messages in thread
From: context @ 2020-05-11  7:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 5484 bytes --]

Hello Hans,

my step-by-step actions:

1. Updated ConTeXt yesterday - described before.

2. Created EnvHome.mkiv for testing:

----
\starttext
   Ahoj
   \ctxlua{print("1",environment.homedir)}
   \ctxlua{print("2",environment.oldhome)}
   \ctxlua{print("3",os.getenv("HOME"))}
   \ctxlua{print("4",os.getenv("USERPROFILE"))}
\stoptext
----

3. Opened console and launched:

----
d:\Lukas\ConTeXt\Test\EnvHome>set 
PATH=d:\Ctx-Beta\tex\texmf-mswin\bin;%PATH%

d:\Lukas\ConTeXt\Test\EnvHome>echo %HOME%
d:\Lukas

d:\Lukas\ConTeXt\Test\EnvHome>context.exe EnvHome.mkiv

resolvers       | formats | executing runner 'run luatex format': 
d:/Ctx-Beta/tex/texmf-mswin/bin/luatex --jobname="EnvHome" 
--fmt=d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.fmt 
--lua=d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui 
cont-yes.mkiv --c:currentrun=1 --c:fulljobname="./EnvHome.mkiv" 
--c:input="./EnvHome.mkiv" --c:kindofrun=1 --c:maxnofruns=9 
--c:texmfbinpath="d:/Ctx-Beta/tex/texmf-mswin/bin"
This is LuaTeX, Version 1.13.0 (TeX Live 2020/W32TeX)
  system commands enabled.
open source     > level 1, order 1, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system          >
system          > ConTeXt  ver: 2020.01.30 14:13 MKIV beta  fmt: 
2020.5.10  int: english/english
system          >
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'EnvHome', input './EnvHome.mkiv', 
result 'EnvHome'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name 
'd:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
1       C:/Users/u×ivatel
2       nil
3       C:/Users/u×ivatel
4       C:/Users/u×ivatel
backend         > xmp > using file 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
close source    > level 2, order 3, name 
'd:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv'
close source    > level 1, order 3, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

mkiv lua stats  > used config file: 
selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.016 seconds, 0 scans 
with scantime 0.000 seconds, 0 shared scans, 12 found files, scanned 
paths: <none>
mkiv lua stats  > stored bytecode data: 450 modules (0.241 sec), 93 
tables (0.012 sec), 543 chunks (0.253 sec)
mkiv lua stats  > traced context: maxstack: 1397, freed: 0, unreachable: 
1397
mkiv lua stats  > cleaned up reserved nodes: 56 nodes, 9 lists of 442
mkiv lua stats  > node memory usage: 11 attribute, 4 attribute_list, 1 
glue, 51 glue_spec, 3 kern, 2 penalty, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 7 
instances (re)created, 38 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf 
output)
mkiv lua stats  > jobdata time: 0.000 seconds saving, 0.000 seconds 
loading
mkiv lua stats  > callbacks: internal: 134, file: 146, direct: 6, late: 
0, function 501, total: 787
mkiv lua stats  > result saved in file: EnvHome.pdf, compresslevel 3, 
objectcompresslevel 1
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, 
lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.110, afm 1.513, tfm 1.000, 7 
instances, 3 shared in backend, 3 common vectors, 0 common hashes, load 
time 0.187 seconds
mkiv lua stats  > used platform: mswin, type: windows, binary subtree: 
texmf-mswin
mkiv lua stats  > used engine: luatex version 1.13 with functionality 
level 7353, banner: this is luatex, version 1.13.0 (tex live 
2020/w32tex)
mkiv lua stats  > control sequences: 45871 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 63 MB, 
ctx: 62 MB, max: unknown MB), hash chars: min(32,40), symbol mask: utf 
(τεχ)
mkiv lua stats  > runtime: 0.499 seconds, 1 processed pages, 1 shipped 
pages, 2.004 pages/second

...

d:\Lukas\ConTeXt\Test\EnvHome>
----

3. So, logged:

"
system          > ConTeXt  ver: 2020.01.30 14:13 MKIV beta  fmt: 
2020.5.10  int: english/english
...
1       C:/Users/u×ivatel
2       nil
3       C:/Users/u×ivatel
4       C:/Users/u×ivatel
"

4. I also didn't find any "oldhome" text using fulltext search in 
ConTeXt installation directory.

Did I updated ConTeXt correctly?

Lukas


On 2020-05-10 17:20, Hans Hagen wrote:
> On 5/10/2020 2:33 PM, context@vivaldi.net wrote:
> 
>> I've just renewed the Ctx Beta installation, but 'environment.oldhome' 
>> seems be unavailable.
> are you ser HOME is set?
> 
> \ctxlua{print("1",environment.homedir)}
> \ctxlua{print("2",environment.oldhome)}
> \ctxlua{print("3",os.getenv("HOME"))}
> \ctxlua{print("4",os.getenv("USERPROFILE"))}
> 
> gives 4 values here
> 
> Hans


[-- Attachment #2: EnvHome.log --]
[-- Type: text/plain, Size: 6936 bytes --]

open source     > level 1, order 1, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system          > 
system          > ConTeXt  ver: 2020.01.30 14:13 MKIV beta  fmt: 2020.5.10  int: english/english
system          > 
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'EnvHome', input './EnvHome.mkiv', result 'EnvHome'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name 'd:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
backend         > xmp > using file 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
close source    > level 2, order 3, name 'd:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv'
close source    > level 1, order 3, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

system          > start used files

system          > text: EnvHome

system          > stop used files


system          > start used files

system          >    1: filename=char-prv.lua filetype=tex format=tex foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/char-prv.lua fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/char-prv.lua usedmethod=database
system          >    2: filename=cont-yes.mkiv filetype=tex foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv usedmethod=database
system          >    3: filename=publ-imp-default.lua filetype=scripts foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua usedmethod=database
system          >    4: filename=cont-new.mkiv filetype=tex foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv usedmethod=database
system          >    5: filename=lang-exc.lua filetype=scripts foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua usedmethod=database
system          >    6: filename=lang-us.lua filetype=scripts foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua usedmethod=database
system          >    7: filename=d:\Lukas\ConTeXt\Test\EnvHome/EnvHome.mkiv foundname=d:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv fullname=d:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv usedmethod=direct
system          >    8: filename=lm.lfg filetype=tex foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg usedmethod=database
system          >    9: filename=lmroman12-regular filetype=otf format=otf foundname=d:/Ctx-Beta/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf fullname=d:/Ctx-Beta/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
system          >   10: filename=latinmodern-math.otf filetype=opentypefonts foundname=d:/Ctx-Beta/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf fullname=d:/Ctx-Beta/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
system          >   11: filename=pdftex.map filetype=map format=map foundname=d:/Ctx-Beta/tex/texmf/fonts/map/pdftex/plain/pdftex.map fullname=d:/Ctx-Beta/tex/texmf/fonts/map/pdftex/plain/pdftex.map usedmethod=database
system          >   12: filename=lpdf-pdx.xml filetype=tex foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml usedmethod=database

system          > stop used files


system          > start commandline options

system          > currentrun="3"
system          > fulljobname="./EnvHome.mkiv"
system          > input="./EnvHome.mkiv"
system          > kindofrun="2"
system          > maxnofruns="9"
system          > texmfbinpath="d:/Ctx-Beta/tex/texmf-mswin/bin"

system          > stop commandline options


system          > start commandline files

system          >    1: ./EnvHome.mkiv

system          > stop commandline files


modules         > start used modules


modules         > stop used modules


mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.000 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 12 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 450 modules (0.238 sec), 93 tables (0.013 sec), 543 chunks (0.251 sec)
mkiv lua stats  > traced context: maxstack: 1397, freed: 0, unreachable: 1397
mkiv lua stats  > cleaned up reserved nodes: 56 nodes, 9 lists of 442
mkiv lua stats  > node memory usage: 11 attribute, 4 attribute_list, 1 glue, 51 glue_spec, 3 kern, 2 penalty, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 7 instances (re)created, 38 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.000 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: internal: 134, file: 146, direct: 6, late: 0, function 501, total: 787
mkiv lua stats  > randomizer: resumed with value 0.27053833007813
mkiv lua stats  > result saved in file: EnvHome.pdf, compresslevel 3, objectcompresslevel 1
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.110, afm 1.513, tfm 1.000, 7 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.187 seconds 
mkiv lua stats  > used platform: mswin, type: windows, binary subtree: texmf-mswin
mkiv lua stats  > used engine: luatex version 1.13 with functionality level 7353, banner: this is luatex, version 1.13.0 (tex live 2020/w32tex)
mkiv lua stats  > control sequences: 45870 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 63 MB, ctx: 62 MB, max: unknown MB), hash chars: min(32,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.515 seconds, 1 processed pages, 1 shipped pages, 1.942 pages/second


[-- Attachment #3: EnvHome.mkiv --]
[-- Type: text/plain, Size: 206 bytes --]

\starttext
  Ahoj
  \ctxlua{print("1",environment.homedir)}
  \ctxlua{print("2",environment.oldhome)}
  \ctxlua{print("3",os.getenv("HOME"))}
  \ctxlua{print("4",os.getenv("USERPROFILE"))}
\stoptext

[-- Attachment #4: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-11  7:44           ` context
@ 2020-05-11  8:51             ` Hans Hagen
  2020-05-11 10:50               ` context
  2020-05-11 15:57               ` context
  0 siblings, 2 replies; 18+ messages in thread
From: Hans Hagen @ 2020-05-11  8:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

> system          > ConTeXt  ver: 2020.01.30 14:13 MKIV beta  fmt: 
> 2020.5.10  int: english/english

> Did I updated ConTeXt correctly?
Well, you made a fresh format, but use a version from january, so ...

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-11  8:51             ` Hans Hagen
@ 2020-05-11 10:50               ` context
  2020-05-11 10:54                 ` Henning Hraban Ramm
  2020-05-11 10:58                 ` Marco Patzer
  2020-05-11 15:57               ` context
  1 sibling, 2 replies; 18+ messages in thread
From: context @ 2020-05-11 10:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

On 2020-05-11 10:51, Hans Hagen wrote:
> Hi,
> 
>> system          > ConTeXt  ver: 2020.01.30 14:13 MKIV beta  fmt: 
>> 2020.5.10  int: english/english
> 
>> Did I updated ConTeXt correctly?
> Well, you made a fresh format, but use a version from january, so ...

so I made a new parallel installation, following exactly instructions 
here:

   https://wiki.contextgarden.net/Windows_10_64_bit_Installation_2019

I forced 32b version due to some reasons.

But I'm still getting the same LuaTeX version:

----
d:\Lukas\ConTeXt\Test\EnvHome>context.exe EnvHome.mkiv --once

resolvers       | formats | executing runner 'run luatex format': 
d:/CtxB/tex/texmf-mswin/bin/luatex --jobname="EnvHome"
This is LuaTeX, Version 1.13.0 (TeX Live 2020/W32TeX)
  system commands enabled.
open source     > level 1, order 1, name 
'd:/CtxB/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system          >
system          > ConTeXt  ver: 2020.01.30 14:13 MKIV beta  fmt: 
2020.5.11  int: english/english
system          >
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 
'd:/CtxB/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name 
'd:/CtxB/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'EnvHome', input './EnvHome.mkiv', 
result 'EnvHome'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name 
'd:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
1       C:/Users/u×ivatel
2       nil
3       C:/Users/u×ivatel
4       C:/Users/u×ivatel
----

I used first-setup.bat; inside:

----
rsync -av --exclude 'rsync.exe' --exclude 'cygwin1.dll' --exclude 
'cygiconv-2.dll' rsync://contextgarden.net/minimals/setup/mswin/bin/ bin
----

- is "minimals" ("rsync://contextgarden.net/minimals") OK here?

- and later inside:

----
mtxrun --script ./bin/mtx-update.lua --update --force --make 
--engine=all --context=beta --engine=luatex --texroot="%OWNPATH%tex" %*
----

- is "--context=beta" OK here?

Lukas


> Hans
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-11 10:50               ` context
@ 2020-05-11 10:54                 ` Henning Hraban Ramm
  2020-05-11 13:36                   ` Henning Hraban Ramm
  2020-05-11 10:58                 ` Marco Patzer
  1 sibling, 1 reply; 18+ messages in thread
From: Henning Hraban Ramm @ 2020-05-11 10:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users


> Am 11.05.2020 um 12:50 schrieb context@vivaldi.net:
> 
> - is "--context=beta" OK here?

Try --context=current

HR
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-11 10:50               ` context
  2020-05-11 10:54                 ` Henning Hraban Ramm
@ 2020-05-11 10:58                 ` Marco Patzer
  2020-05-11 15:20                   ` context
  1 sibling, 1 reply; 18+ messages in thread
From: Marco Patzer @ 2020-05-11 10:58 UTC (permalink / raw)
  To: ntg-context

On Mon, 11 May 2020 12:50:51 +0200
context@vivaldi.net wrote:

> so I made a new parallel installation, following exactly instructions 
> here:
> 
>    https://wiki.contextgarden.net/Windows_10_64_bit_Installation_2019
> 
> I forced 32b version due to some reasons.
> 
> But I'm still getting the same LuaTeX version:

I had the same issue. You have to add --context=latest:

  https://mailman.ntg.nl/pipermail/ntg-context/2020/097651.html

Marco
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-11 10:54                 ` Henning Hraban Ramm
@ 2020-05-11 13:36                   ` Henning Hraban Ramm
  0 siblings, 0 replies; 18+ messages in thread
From: Henning Hraban Ramm @ 2020-05-11 13:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> Am 11.05.2020 um 12:54 schrieb Henning Hraban Ramm <texml@fiee.net>:
> 
> 
>> Am 11.05.2020 um 12:50 schrieb context@vivaldi.net:
>> 
>> - is "--context=beta" OK here?
> 
> Try --context=current

Sorry, of course "latest", as Marco wrote, I mixed that up.

HR
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-11 10:58                 ` Marco Patzer
@ 2020-05-11 15:20                   ` context
  0 siblings, 0 replies; 18+ messages in thread
From: context @ 2020-05-11 15:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

great, this fixed my problem! (But another one came...)

Best regards,

Lukas


On 2020-05-11 12:58, Marco Patzer wrote:
> On Mon, 11 May 2020 12:50:51 +0200
> context@vivaldi.net wrote:
> 
>> so I made a new parallel installation, following exactly instructions
>> here:
>> 
>>    https://wiki.contextgarden.net/Windows_10_64_bit_Installation_2019
>> 
>> I forced 32b version due to some reasons.
>> 
>> But I'm still getting the same LuaTeX version:
> 
> I had the same issue. You have to add --context=latest:
> 
>   https://mailman.ntg.nl/pipermail/ntg-context/2020/097651.html
> 
> Marco
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-11  8:51             ` Hans Hagen
  2020-05-11 10:50               ` context
@ 2020-05-11 15:57               ` context
  2020-05-12  8:53                 ` Hans Hagen
  1 sibling, 1 reply; 18+ messages in thread
From: context @ 2020-05-11 15:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 5141 bytes --]

Hello Hans,

so I updated to latest ConTeXt (thanks Marco and Henning) but there is 
still a problem - see:

----
d:\Lukas\ConTeXt\Test\EnvHome>set HOME=DummyHome

d:\Lukas\ConTeXt\Test\EnvHome>set 
PATH=d:\Ctx-Beta\tex\texmf-mswin\bin;%PATH%

d:\Lukas\ConTeXt\Test\EnvHome>echo %HOME%
DummyHome

d:\Lukas\ConTeXt\Test\EnvHome>echo %PATH%
d:\Ctx-Beta\tex\texmf-mswin\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program 
Files\Intel\DMIX;C:\Program Fi
rosoft SQL Server\90\Tools\binn\;C:\Program Files\Git\cmd

d:\Lukas\ConTeXt\Test\EnvHome>findfile context.exe
d:\Ctx-Beta\tex\texmf-mswin\bin\context.exe

d:\Lukas\ConTeXt\Test\EnvHome>context.exe EnvHome.mkiv --once

resolvers       | formats | executing runner 'run luatex format': 
d:/Ctx-Beta/tex/texmf-mswin/bin/luatex --jobname="EnvHome" 
--fmt=d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f
This is LuaTeX, Version 1.13.0 (TeX Live 2020/W32TeX)
  system commands enabled.
open source     > level 1, order 1, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system          >
system          > ConTeXt  ver: 2020.05.08 20:46 MKIV beta  fmt: 
2020.5.11  int: english/english
system          >
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'EnvHome', input './EnvHome.mkiv', 
result 'EnvHome'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name 
'd:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
1       C:/Users/u×ivatel
2       C:/Users/u×ivatel
3       C:/Users/u×ivatel
4       C:/Users/u×ivatel
backend         > xmp > using file 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
close source    > level 2, order 3, name 
'd:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv'
close source    > level 1, order 3, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

mkiv lua stats  > used config file: 
selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 0 scans 
with scantime 0.000 seconds, 0 shared scans, 12 found files, scanned 
paths: <none>
mkiv lua stats  > stored bytecode data: 452 modules (0.232 sec), 93 
tables (0.012 sec), 545 chunks (0.244 sec)
mkiv lua stats  > traced context: maxstack: 1407, freed: 0, unreachable: 
1407
mkiv lua stats  > cleaned up reserved nodes: 57 nodes, 9 lists of 442
mkiv lua stats  > node memory usage: 11 attribute, 4 attribute_list, 1 
glue, 51 glue_spec, 3 kern, 2 penalty, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 7 
instances (re)created, 38 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf 
output)
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds 
loading
mkiv lua stats  > callbacks: internal: 134, file: 146, direct: 6, late: 
0, function 501, total: 787
mkiv lua stats  > result saved in file: EnvHome.pdf, compresslevel 3, 
objectcompresslevel 1
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, 
lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.111, afm 1.513, tfm 1.000, 7 
instances, 3 shared in backend, 3 common vectors, 0 common hashes, load 
time 0.198 seconds
mkiv lua stats  > used platform: mswin, type: windows, binary subtree: 
texmf-mswin
mkiv lua stats  > used engine: luatex version: 1.13, functionality 
level: 7353, banner: this is luatex, version 1.13.0 (tex live 
2020/w32tex)
mkiv lua stats  > control sequences: 45940 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 68 MB, 
ctx: 67 MB, max: unknown MB, hash chars: min(32,40), symbol mask: utf 
(τεχ)
mkiv lua stats  > runtime: 0.522 seconds, 1 processed pages, 1 shipped 
pages, 1.916 pages/second
system          | total runtime: 0.823 seconds

d:\Lukas\ConTeXt\Test\EnvHome>
----

- I'm still getting:

1       C:/Users/u×ivatel
2       C:/Users/u×ivatel
3       C:/Users/u×ivatel
4       C:/Users/u×ivatel

whilst HOME environment has been set to "DummyHome"  (see "echo 
%HOME%").

What's wrong?

Lukas


On 2020-05-11 10:51, Hans Hagen wrote:
> Hi,
> 
>> system          > ConTeXt  ver: 2020.01.30 14:13 MKIV beta  fmt: 
>> 2020.5.10  int: english/english
> 
>> Did I updated ConTeXt correctly?
> Well, you made a fresh format, but use a version from january, so ...
> 
> Hans

[-- Attachment #2: EnvHome.log --]
[-- Type: text/plain, Size: 6897 bytes --]

open source     > level 1, order 1, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system          > 
system          > ConTeXt  ver: 2020.05.08 20:46 MKIV beta  fmt: 2020.5.11  int: english/english
system          > 
system          > 'cont-new.mkiv' loaded
open source     > level 2, order 2, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > beware: some patches loaded from cont-new.mkiv
close source    > level 2, order 2, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system          > files > jobname 'EnvHome', input './EnvHome.mkiv', result 'EnvHome'
fonts           > latin modern fonts are not preloaded
languages       > language 'en' is active
open source     > level 2, order 3, name 'd:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv'
fonts           > preloading latin modern fonts (second stage)
fonts           > 'fallback modern-designsize rm 12pt' is loaded
backend         > xmp > using file 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1, subpage 1
close source    > level 2, order 3, name 'd:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv'
close source    > level 1, order 3, name 'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

system          > start used files

system          > text: EnvHome

system          > stop used files


system          > start used files

system          >    1: filename=char-prv.lua filetype=tex format=tex foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/char-prv.lua fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/char-prv.lua usedmethod=database
system          >    2: filename=cont-yes.mkiv filetype=tex foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv usedmethod=database
system          >    3: filename=publ-imp-default.lua filetype=scripts foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/publ-imp-default.lua usedmethod=database
system          >    4: filename=cont-new.mkiv filetype=tex foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv usedmethod=database
system          >    5: filename=lang-exc.lua filetype=scripts foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lang-exc.lua usedmethod=database
system          >    6: filename=lang-us.lua filetype=scripts foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/patterns/mkiv/lang-us.lua usedmethod=database
system          >    7: filename=d:\Lukas\ConTeXt\Test\EnvHome/EnvHome.mkiv foundname=d:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv fullname=d:/Lukas/ConTeXt/Test/EnvHome/EnvHome.mkiv usedmethod=direct
system          >    8: filename=lm.lfg filetype=tex foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/fonts/mkiv/lm.lfg usedmethod=database
system          >    9: filename=lmroman12-regular filetype=otf format=otf foundname=d:/Ctx-Beta/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf fullname=d:/Ctx-Beta/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf usedmethod=database
system          >   10: filename=latinmodern-math.otf filetype=opentypefonts foundname=d:/Ctx-Beta/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf fullname=d:/Ctx-Beta/tex/texmf/fonts/opentype/public/lm-math/latinmodern-math.otf usedmethod=database
system          >   11: filename=pdftex.map filetype=map format=map foundname=d:/Ctx-Beta/tex/texmf/fonts/map/pdftex/plain/pdftex.map fullname=d:/Ctx-Beta/tex/texmf/fonts/map/pdftex/plain/pdftex.map usedmethod=database
system          >   12: filename=lpdf-pdx.xml filetype=tex foundname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml fullname=d:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml usedmethod=database

system          > stop used files


system          > start commandline options

system          > currentrun="1"
system          > fulljobname="./EnvHome.mkiv"
system          > input="./EnvHome.mkiv"
system          > kindofrun="3"
system          > maxnofruns="1"
system          > once="true"
system          > texmfbinpath="d:/Ctx-Beta/tex/texmf-mswin/bin"

system          > stop commandline options


system          > start commandline files

system          >    1: ./EnvHome.mkiv

system          > stop commandline files


modules         > start used modules


modules         > stop used modules


mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: d:/Ctx-Beta/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 0 scans with scantime 0.000 seconds, 0 shared scans, 12 found files, scanned paths: <none>
mkiv lua stats  > stored bytecode data: 452 modules (0.232 sec), 93 tables (0.012 sec), 545 chunks (0.244 sec)
mkiv lua stats  > traced context: maxstack: 1407, freed: 0, unreachable: 1407
mkiv lua stats  > cleaned up reserved nodes: 57 nodes, 9 lists of 442
mkiv lua stats  > node memory usage: 11 attribute, 4 attribute_list, 1 glue, 51 glue_spec, 3 kern, 2 penalty, 2 temp, 2 user_defined
mkiv lua stats  > node list callback tasks: 8 unique task lists, 7 instances (re)created, 38 calls
mkiv lua stats  > used backend: pdf (backend for directly generating pdf output)
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loading
mkiv lua stats  > callbacks: internal: 134, file: 146, direct: 6, late: 0, function 501, total: 787
mkiv lua stats  > result saved in file: EnvHome.pdf, compresslevel 3, objectcompresslevel 1
mkiv lua stats  > loaded patterns: en::1, load time: 0.000
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf, lmroman12-regular.otf
mkiv lua stats  > font engine: otf 3.111, afm 1.513, tfm 1.000, 7 instances, 3 shared in backend, 3 common vectors, 0 common hashes, load time 0.198 seconds 
mkiv lua stats  > used platform: mswin, type: windows, binary subtree: texmf-mswin
mkiv lua stats  > used engine: luatex version: 1.13, functionality level: 7353, banner: this is luatex, version 1.13.0 (tex live 2020/w32tex)
mkiv lua stats  > control sequences: 45940 of 65536 + 100000
mkiv lua stats  > lua properties: engine: lua 5.3, used memory: 68 MB, ctx: 67 MB, max: unknown MB, hash chars: min(32,40), symbol mask: utf (τεχ)
mkiv lua stats  > runtime: 0.522 seconds, 1 processed pages, 1 shipped pages, 1.916 pages/second


[-- Attachment #3: EnvHome.mkiv --]
[-- Type: text/plain, Size: 206 bytes --]

\starttext
  Ahoj
  \ctxlua{print("1",environment.homedir)}
  \ctxlua{print("2",environment.oldhome)}
  \ctxlua{print("3",os.getenv("HOME"))}
  \ctxlua{print("4",os.getenv("USERPROFILE"))}
\stoptext

[-- Attachment #4: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-11 15:57               ` context
@ 2020-05-12  8:53                 ` Hans Hagen
  2020-05-12  9:36                   ` context
  0 siblings, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2020-05-12  8:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/11/2020 5:57 PM, context@vivaldi.net wrote:

> d:\Lukas\ConTeXt\Test\EnvHome>
> ----
> 
> - I'm still getting:
> 
> 1       C:/Users/u×ivatel
> 2       C:/Users/u×ivatel
> 3       C:/Users/u×ivatel
> 4       C:/Users/u×ivatel
> 
> whilst HOME environment has been set to "DummyHome"  (see "echo %HOME%").
> 
> What's wrong?
I don't know ... maybe it pick up HOME from someplace else (the outer 
process space or so)

you can insert prints (say os.getenv('HOME')) and see what happens

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-12  8:53                 ` Hans Hagen
@ 2020-05-12  9:36                   ` context
  2020-05-12 11:53                     ` Hans Hagen
  0 siblings, 1 reply; 18+ messages in thread
From: context @ 2020-05-12  9:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello,

On 2020-05-12 10:53, Hans Hagen wrote:
> On 5/11/2020 5:57 PM, context@vivaldi.net wrote:
> 
>> d:\Lukas\ConTeXt\Test\EnvHome>
>> ----
>> 
>> - I'm still getting:
>> 
>> 1       C:/Users/u×ivatel
>> 2       C:/Users/u×ivatel
>> 3       C:/Users/u×ivatel
>> 4       C:/Users/u×ivatel
>> 
>> whilst HOME environment has been set to "DummyHome"  (see "echo 
>> %HOME%").
>> 
>> What's wrong?

I can try.

I found 'oldhome' text in these files:

d:\Ctx-Beta\tex\texmf-context\scripts\context\lua\mtxrun.lua
d:\Ctx-Beta\tex\texmf-context\scripts\context\stubs\mswin\mtxrun.lua
d:\Ctx-Beta\tex\texmf-context\scripts\context\stubs\unix\mtxrun
d:\Ctx-Beta\tex\texmf-context\scripts\context\stubs\win64\mtxrun.lua
d:\Ctx-Beta\tex\texmf-context\tex\context\base\mkiv\data-ini.lua
d:\Ctx-Beta\tex\texmf-mswin\bin\mtxrun.lua

Which files do you recommend to try to insert debug prints into?

And - once I "inject" an extra debug info - do I have to call 
"context.exe --make --generate" (or similar)?

Lukas


> I don't know ... maybe it pick up HOME from someplace else (the outer
> process space or so)
> 
> you can insert prints (say os.getenv('HOME')) and see what happens
> 
> Hans
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-12  9:36                   ` context
@ 2020-05-12 11:53                     ` Hans Hagen
  2020-05-14  7:47                       ` context
  0 siblings, 1 reply; 18+ messages in thread
From: Hans Hagen @ 2020-05-12 11:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 5/12/2020 11:36 AM, context@vivaldi.net wrote:

> And - once I "inject" an extra debug info - do I have to call 
> "context.exe --make --generate" (or similar)?
You need to remake the fomat (and make sure you have the right 
mtxrun/context scripts).

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: Retrieving original value of enviroment variable HOME
  2020-05-12 11:53                     ` Hans Hagen
@ 2020-05-14  7:47                       ` context
  0 siblings, 0 replies; 18+ messages in thread
From: context @ 2020-05-14  7:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hello Hans,

I made some observations and ... - shortly, the simpliest solution seems 
to me:

Would it be accptable for your to replace

   "
   local homedir = osgetenv(ostype == "windows" and 'USERPROFILE' or 
'HOME') or ''
   "

with:

   "
   local homedir= ostype=="windows" and (osgetenv('HOME') or 
osgetenv('USERPROFILE')) or osgetenv('HOME') or ''
   "

- I made that replacement in:

   tex\texmf-mswin\bin\mtxrun.lua

and

   tex\texmf-context\tex\context\base\mkiv\data-ini.lua

(I have also another solution, but you might find it more hacky, so 
let's keep it in silence so far...)

Best regards,

Lukas


On 2020-05-12 13:53, Hans Hagen wrote:
> On 5/12/2020 11:36 AM, context@vivaldi.net wrote:
> 
>> And - once I "inject" an extra debug info - do I have to call 
>> "context.exe --make --generate" (or similar)?
> You need to remake the fomat (and make sure you have the right
> mtxrun/context scripts).
> 
> Hans
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-05-14  7:47 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06 15:43 Retrieving original value of enviroment variable HOME context
2020-05-07  6:54 ` Hans Hagen
2020-05-07 10:30   ` context
2020-05-08 12:18     ` Hans Hagen
2020-05-10 12:33       ` context
2020-05-10 15:20         ` Hans Hagen
2020-05-11  7:44           ` context
2020-05-11  8:51             ` Hans Hagen
2020-05-11 10:50               ` context
2020-05-11 10:54                 ` Henning Hraban Ramm
2020-05-11 13:36                   ` Henning Hraban Ramm
2020-05-11 10:58                 ` Marco Patzer
2020-05-11 15:20                   ` context
2020-05-11 15:57               ` context
2020-05-12  8:53                 ` Hans Hagen
2020-05-12  9:36                   ` context
2020-05-12 11:53                     ` Hans Hagen
2020-05-14  7:47                       ` context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).