ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Sanjoy Mahajan <sanjoy@mrao.cam.ac.uk>
Subject: Re: problem in kpse.rb
Date: Sun, 17 Sep 2006 04:13:38 +0100	[thread overview]
Message-ID: <E1GOn6A-0005it-00@skye.ra.phy.cam.ac.uk> (raw)
In-Reply-To: Your message of "Sun, 17 Sep 2006 04:23:51 +0200." <97a06f070609161923pf190bd4lec69f54159eb04f0@mail.gmail.com>

> path = run("--expand-path=\\\$#{varname}") rescue ''
> 
> to
> 
> path = run("--expand-path=\$#{varname}") rescue ''

I also ran into this (a few weeks ago on the list) and the patch I
sent Hans after testing it on my Ubuntu Linux laptop was to use two
backslashes:

  run("--expand-path=\\$#{varname}")

so that Unix sees the command as, for example,

  kpsewhich --expand-path=\$TEXMFLOCAL

which prevents the shell from expanding TEXMFLOCAL as a shell or
environment variable, leaving it for kpse to find it in texmf.cnf.
Interesting that \$ also works.  I guess the \ gets passed unchanged,
so the $ still gets procted from the shell.

By the way, the rescue '' doesn't do anything, since a failed run of
kpsewhich doesn't throw an exception.  I think I have a patch for
that.

Hans, should I resend those patches?

-Sanjoy

`Never underestimate the evil of which men of power are capable.'
         --Bertrand Russell, _War Crimes in Vietnam_, chapter 1.

  reply	other threads:[~2006-09-17  3:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-17  2:23 Johan Sandblom
2006-09-17  3:13 ` Sanjoy Mahajan [this message]
2006-09-17  7:45   ` Johan Sandblom
2006-09-17  9:02     ` Taco Hoekwater
2006-09-17  9:12       ` Johan Sandblom
2006-09-17 14:11       ` Hans Hagen

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=E1GOn6A-0005it-00@skye.ra.phy.cam.ac.uk \
    --to=sanjoy@mrao.cam.ac.uk \
    --cc=ntg-context@ntg.nl \
    /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).