ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <j.hagen@xs4all.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>,
	Thangalin <thangalin@gmail.com>
Subject: Re: Set luatex cache directory path
Date: Tue, 6 Apr 2021 23:38:14 +0200	[thread overview]
Message-ID: <b35dd58d-bd98-cbe6-4f1a-682720c9364c@xs4all.nl> (raw)
In-Reply-To: <CAANrE7qo0Kej2wMghQLpSpr4h43Ezq69qUPcTh-P521B1vhLsw@mail.gmail.com>

On 4/6/2021 8:59 PM, Thangalin wrote:
> 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
>     <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)

Do you really want to recahe fonts so often?

> 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 );
>      }

--batch only makes sense for an unattended run
--purging every time can lead to extra runs

> 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

see aditya's reply ... the --autogenerate is clever enough not to do 
redundant things (and context knows when it has been updated so ...)

> 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).
see aditya's reply ... quite some effort has gone into making sure 
context starts up fast so i'm not going to advocate a different practice

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
___________________________________________________________________________________

      parent reply	other threads:[~2021-04-06 21:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 22:19 Thangalin
2021-04-06  7:31 ` Aditya Mahajan
2021-04-06 18:59   ` Thangalin
2021-04-06 19:24     ` Aditya Mahajan
2021-04-06 21:06       ` Thangalin
2021-04-10 23:30       ` Thangalin
2021-04-11  9:16         ` Hans Hagen
2021-04-11 21:13           ` Thangalin
2021-04-06 21:38     ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b35dd58d-bd98-cbe6-4f1a-682720c9364c@xs4all.nl \
    --to=j.hagen@xs4all.nl \
    --cc=ntg-context@ntg.nl \
    --cc=thangalin@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).