From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/111030 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thangalin Newsgroups: gmane.comp.tex.context Subject: Re: Set luatex cache directory path Date: Tue, 6 Apr 2021 11:59:36 -0700 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1442897695142218323==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6417"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 06 21:00:18 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTqvy-0001ZZ-2z for gctc-ntg-context-518@m.gmane-mx.org; Tue, 06 Apr 2021 21:00:18 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4E13628237A; Tue, 6 Apr 2021 20:59:55 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8lHMkKBB9_qa; Tue, 6 Apr 2021 20:59:53 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 45F0A282370; Tue, 6 Apr 2021 20:59:53 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id B6100282370 for ; Tue, 6 Apr 2021 20:59:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZdFR6wnTH7Dj for ; Tue, 6 Apr 2021 20:59:50 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.167.179; helo=mail-oi1-f179.google.com; envelope-from=thangalin@gmail.com; receiver= Original-Received: from mail-oi1-f179.google.com (mail-oi1-f179.google.com [209.85.167.179]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id A4F34282115 for ; Tue, 6 Apr 2021 20:59:50 +0200 (CEST) Original-Received: by mail-oi1-f179.google.com with SMTP id i81so16209110oif.6 for ; Tue, 06 Apr 2021 11:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=BZk1ZdLa3cTOEWKUn2yvH/qBEvMWFat/GiWwrcOe6vU=; b=EwYZ9tvSwTBDUq8KdY7O5vKE7YbQXL/ut3ZZIUNRM4/eqBF2ztOB/eNM8fFkPc+gws jj6FZFeOEZiE3Va0NxCgMLETZRxwoc6JFiniXeveBE/w5sFq1B1Kjswvo0xyqlM0fkv2 gDuF++35CQBG7fodmqhX7p16yW98DDYJm0sZ+gOktrWclc+KDu1zL+ZrOWxvfikGFGbC YweC+5Gyt6/oKOrS1YMa8LZPFSZrSon5+iLSbaJBU1XuHBVjs0jAAeTqwx4h6a6PRAB1 LKFfKT6UPEdZHTtlBwdaSywfM0mYU30xbB+p81H0LybC0K7uLvuIC7i1Uvs7iryG8cJ1 aKvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=BZk1ZdLa3cTOEWKUn2yvH/qBEvMWFat/GiWwrcOe6vU=; b=ix7hNNjVdYqizCyvUA23NBg1gjVZdq++Q+xDEvu/5IPL+qP5kW4D1KEK6V+Wg5bcju CJu8VeRmmEojnQ0p5d7vYLqQBWSUvKJfUEdh2HOyEBW/Ss1/0XC64W8701UgUyyIO2+L OmbO8+Gi1OY8jtCRbpZi/ZW8EGCyfTVMad+C+I542ALCQXKnuvco+53Na7UcnfXw3ArZ lAL+KAvTO9rJTqjtVzrYuPF9ejV5CWcCJu2Bfgck/WeZcobps3DR7AyzRUQXec34Iwmp /28TqK0Bp0ayg4kzkTGut+uvNfHj3SuDGoVV4kiMJyYGuSnMJ59H3LP/Q2av6SbeJl/k MnhA== X-Gm-Message-State: AOAM532oEo0haHb9+Qx6SqxV1hYcfv4tTPutxkw7BFE/wS4iBuQ9a7XW bidn7mBtMx7/Reud3wZCgKXJoyKueTGgGG1mOIA6lwPwYluYKQ== X-Google-Smtp-Source: ABdhPJw99Ck0cjOy5KUQwY1tneYLkp9r67b0zPeYyZpvHH/2OvgWT+gzjRz0H7BPNUaCTLzbr+C1lZOOUY/IqhPkfEA= X-Received: by 2002:a05:6808:a1a:: with SMTP id n26mr4424673oij.0.1617735587316; Tue, 06 Apr 2021 11:59:47 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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" Xref: news.gmane.io gmane.comp.tex.context:111030 Archived-At: --===============1442897695142218323== Content-Type: multipart/alternative; boundary="00000000000005c7f305bf526b36" --00000000000005c7f305bf526b36 Content-Type: text/plain; charset="UTF-8" Thanks Aditya. What do you think of changing the default luatex-cache directory to the system's temporary directory? Consider: - The $HOME directory is sacrosanct (4784 people agree: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1575053) - The temp directory is cleared on Linux (Unix?) system reboots; purged during regular Windows upkeep - The temp directory is writable by default - Changing the location requires calling an additional program, which isn't obvious (principle of least astonishment) My text editor invokes ConTeXt like: if( TYPESETTER.canRun() ) { env.put( "TEXMFCACHE", System.getProperty( "java.io.tmpdir" ) ); mArgs.add( TYPESETTER.getName() ); mArgs.add( .. --path .. --purge .. --batch .. --result .. --environment .. etc. ); mArgs.add( inputFilename ); } The first line ensures that "context" is an executable located in a PATH directory. The second line attempts to change the luatex-cache directory. The remaining lines configure the command-line arguments prior to running ConTeXt. Fearing flaming wrath from users, an additional mtxrun call is required, which incurs overhead: - Check for mtxrun executable - Run mtxrun each time This would work but feels like a leaky abstraction (i.e., the context executable should honour TEXMFCACHE without needing to invoke mtxrun because context creates the luatex-cache directory). Thoughts? --00000000000005c7f305bf526b36 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks Aditya.

<= div>What do you think of changing the default luatex-cache directory to the= system's temporary directory? Consider:
  • The $HOME di= rectory is sacrosanct (4784 people agree: https://bugs.launchpad.net/ubuntu/+= source/snapd/+bug/1575053)
  • The temp directory is cleared on Lin= ux (Unix?) system reboots; purged during regular Windows upkeep
  • The temp directory is writable by default
  • Changing the location re= quires calling an additional program, which isn't obvious (principle of= least astonishment)
My text editor invokes ConTeXt like:
=
=C2=A0 =C2=A0 if( TYPESETTER.canRun() ) {
=C2=A0 =C2=A0 =C2=A0 env.p= ut( "TEXMFCACHE", System.getProperty( "java.io.tmpdir" = ) );

=C2=A0 =C2=A0 =C2=A0 mArgs.add( TYPESETTER.getName() );
=C2= =A0 =C2=A0 =C2=A0 mArgs.add( .. --path .. --purge .. --batch .. --result ..= --environment .. etc. );
=C2=A0 =C2=A0 =C2=A0 mArgs.add( inputFilename = );
=C2=A0=C2=A0=C2=A0 }

The first li= ne ensures that "context" is an executable located in a PATH dire= ctory. The second line attempts to change the luatex-cache directory. The r= emaining lines configure the command-line arguments prior to running ConTeX= t.

Fearing flaming wrath from users, an additional= mtxrun call is required, which incurs overhead:
  • Check fo= r mtxrun executable
  • Run mtxrun each time
This wou= ld work but feels like a leaky abstraction (i.e., the context executable sh= ould honour TEXMFCACHE without needing to invoke mtxrun because context cre= ates the luatex-cache directory).

Thoughts?

--00000000000005c7f305bf526b36-- --===============1442897695142218323== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============1442897695142218323==--